Live data from Hacker News

Versioning Your Home Directory

martinovic.blog

1–10 of 45 posts

Re: Versioning Your Home Directory

#3
That's probably the worst possible way of versioning your home besides, possibly, making a zip of your whole home directory every time you would otherwise to a commit.

Just use a snapshot-enabled filesystem. ZFS works awesomely, BTRFS too (but it's not released as stable and production ready AFAIK) and LVM can have snapshots too (take a look at the snapper project by Red Hat).

Just use ZFS and snapshot the whole filesystem.

Re: Versioning Your Home Directory

#4
post #3

That's probably the worst possible way of versioning your home besides, possibly, making a zip of your whole home directory every time you would otherwise to a commit. Just use a snapshot-enabled filesystem. ZFS works awesomely, BTRFS too (but it's not released as stable and production ready AFAIK) and LVM can have snapshots too (take a look at the snapper project by Red Hat). Just use ZFS and snapshot the whole file…

How would you transfer a snapshot to another machine? That's the use case.

Re: Versioning Your Home Directory

#6
I have gone one step further for my computers at home (a desktop and a laptop) and have put most of the stuff in my home directory in a git repository, not just configuration files. That way I keep those two synchronized. The thing I do not have in the git repository is media files because they are too large. Instead I just backup the media files about twice a year.

Re: Versioning Your Home Directory

#7
post #3

That's probably the worst possible way of versioning your home besides, possibly, making a zip of your whole home directory every time you would otherwise to a commit. Just use a snapshot-enabled filesystem. ZFS works awesomely, BTRFS too (but it's not released as stable and production ready AFAIK) and LVM can have snapshots too (take a look at the snapper project by Red Hat). Just use ZFS and snapshot the whole file…

It's questionable as to what the author means by "Home Directory". If the author has actual binaries rather than just shell scripts in ~/bin for example I agree adding such things to git is not ideal.

I use the same setup (with a similar get of ignores) of my home being the root of a git repo for my dotfiles, but it's dotfiles alone that get added to git.

Re: Versioning Your Home Directory

#8
I backup to B2 using Restic. It dedupes while also storing each version with a tag. It's not as fancy as git with the diffs... but my home dir is full of git repos and they are backed up of course.

You can mount your whole backup using FUSE and browse around, or restore to some other directory. Multiple computers? Multiple folders to backup? All handled. It's got ignore/include for your binaries and bundled dependencies and whatnot.

Edit: encrypted by default.

Re: Versioning Your Home Directory

#9
I use Dropbox to sync my home directories across machines. I specifically want them to sync but not version. The reason is that I'll be working on one machine (say at the office), want to continue typing and testing on another machine (say at home), and specifically do NOT want to commit in the half-finished erratic state things may be in.

Dropbox deals with syncing across machines on in instantaneous basis so that all machines have the same thing at every instant, allowing me to change location or machine and keep working. Git deals with versioning.

Re: Versioning Your Home Directory

#10
post #4
post #3

That's probably the worst possible way of versioning your home besides, possibly, making a zip of your whole home directory every time you would otherwise to a commit. Just use a snapshot-enabled filesystem. ZFS works awesomely, BTRFS too (but it's not released as stable and production ready AFAIK) and LVM can have snapshots too (take a look at the snapper project by Red Hat). Just use ZFS and snapshot the whole file…

How would you transfer a snapshot to another machine? That's the use case.

There's always zfs send and zfs receive, but these don't work automatically.
Post reply on HN