I have got a new computer (or actually my son has, and I run a Virtualbox
instance on his computer) what do I need to do to get everything
working on this new box? Obviously, the same programs must be installed,
but how about my $HOME? I don't want a replicate of my $HOME, since I
use git-annex
, instead a want a new instance of my annex, and all
symlinks that is needed for dot-files in $HOME that point into my
~/annex
.
In this guide, "noels" is the new computer running in virtualbox, while "hans-vita" is the old machine.
hans-vita
to noels
.rsync -va .ssh hans@noels:
On noels
use git to clone the repository from hans-vita
:
git clone ssh://hans-vita/home/hans/annex ~/annex cd ~/annex git-annex init noels
For now this is enough, later we will add the other remote repositories too.
From noels
, issue
git-annex get *.gitattributes
git-annex get --auto
git remote add noels ssh://noels/home/hans/annex
Create an archive on the old box with all symlinked dot-files in $HOME that point into ~/annex
.
tar -jcvf ~/annex/symlinks.tbz `find $HOME -xdev ! -iname "annex*" -type l -lname "$HOME/annex*" -o -lname "annex*"`
Add this archive into the repository
git-annex add .
Sync the index of the two repositories
git-annex sync noels
Transfer a copy to noels
:
git-annex get symlinks.tbz
extract the symlinks:
tar -C / -jxvf ~/annex/symlinks.tbz