Recently I've been experimenting with KVM and virtual machines. I'm lazy and tired of manually copying/syncing my .rc files. Some Googling didn't immediately turn up any tools. Are there any CLI tools available for easily distributing or replicating them? My current solution is some scripted wgets.
1 Answers
The best approach is to put your dot files under version control. To make them available on a new machine, simply check them out. If you don't care about privacy, you can put your files on a site like Github. If you do, you can check out over SSH. On a virtual machine, if available, you can check out from a mounted host filesystem.
Version control gives you benefits well beyond easy synchronization. In particular, it gives you a version history, so that if you break something, you can go back to when it broke, which helps a lot in figuring out why it broke. You also get a way to reconcile changes if you modify the same file on different machines.
If you really don't want to use version control, you can simply copy the files with a tool like rsync (or Unison for bidirectional synchronization). You can also upload your files to an online service and download them. Apart from Unison to some extent, these methods won't help you if you ever modify the same file on two different machines.
One thing you'll have to do no matter what solution you choose is decide which files to replicate. Unfortunately, many applications don't make a clear distinction between user configuration files (which needs to be synchronized) and local state (which cannot be synchronized meaningfully).

- 829,060
-
I read your answer on the linked question regarding a repo subdirectory and symlink script. I think that approach will work for me. – Pete Aug 13 '14 at 00:33
.rc
files special to it, or they normal system things and maintaining multiple VM images is just an example of why one might want to replicate them? – goldilocks Aug 12 '14 at 18:38