Getting a new $HOME

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.

Setting up ssh

rsync -va .ssh hans@noels:

Creating a new repository for git-annex

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.

Getting all .gitattributes

From noels, issue

git-annex get *.gitattributes

Getting contents according to the policy in .gittattributes

git-annex get --auto

Informing the old box about the new one

git remote add noels ssh://noels/home/hans/annex

Duplicate all symlinked dot-files that point into ~/annex

On hans-vita

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

On noels

Transfer a copy to noels:

git-annex get symlinks.tbz

extract the symlinks:

tar -C / -jxvf ~/annex/symlinks.tbz

comments powered by Disqus


Back to the index

Blog roll

R-bloggers, Debian Weekly
Valid XHTML 1.0 Strict [Valid RSS] Valid CSS! Emacs Muse Last modified: oktober 17, 2019