3 ms·
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
by znpy 7y ago
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.
- pdonis 7y agoHow would you transfer a snapshot to another machine? That's the use case.
- thwarted 7y agoThere's always zfs send and zfs receive, but these don't work automatically.
- lostapathy 7y agoThe ZFS tools don't really cover the case of ignoring a bunch of transient files in your home directory that you don't want to sync around. Things like browser temp files, etc.
- znpy 7y agoYou know, this aspect of versioning a home directory is basically why home directories aren't versioned very often. That being said, if you want to "version your home directory", I think that zfs is the best approach. Also, transient files and browser temp files should reside on /tmp AFAIK... So that's less of an issue. If you application is writing temporary files outside of /tmp, then it's probably a bug.
- lostapathy 7y agoTake your chrome browser history. That doesn't really belong in /tmp, but it's also not something that's going to sync around well with zfs, either.
- gbrown_ 7y agoIt'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.
- Aeolun 7y agoI don’t have ZFS on every PC I work with.
- rsync 7y agoI have absolutely no dog in this fight at all but, in case anyone is interested, if you don't have zfs on a system you can create and maintain "rsync snapshots" by using hard links that take up zero space: http://www.mikerubel.org/computers/rsync_snapshots/ http://www.mikerubel.org/computers/rsync_snapshots/ The idea is, you rsync to a snapshot directory (just like .zfs/snapshot/name_of_snapshot would be) but since you are hardlinking everything, almost all of the files take up zero space. Only files that change get their hardlinks broken and take up any space. You can put the dir names in rotation and make them work exactly like zfs snapshots. This is how people did snapshots before zfs.
- O_H_E 7y agoSnapper is maintained under openSUSE https://github.com/openSUSE/snapper https://github.com/openSUSE/snapper
- PyroLagus 7y agoExcept you don't get nice per-file history, which may not be important to you, but if it is, then using git is certainly not "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". Filesystem snapshotting also makes it more complicated to sync your dotfiles with machines that have other filesystems.