Migrating user data

January 31st 2007 08:59 pm

So last time I mentioned that I bought a new computer and moved my user and system data over, and that I would mention some of the steps I took. It was actually much easier than I thought it would be.

The simple solution, of course, is just to copy over everything in /home to the other computer using scp or rsync and hope everything continues to work. :-). And actually, that worked just fine for my wife’s user account since her user name did not change.

In my case however, my username was still kde-cvs from way back in the day when KDE was developed using CVS. I switched my username to kde-svn to reflect the current repository for KDE, but then I had to make sure that stuff still worked.

The reason software would break is that the configuration files typically save the full path to any files that may be listed in the configuration. KDE applications, by and large, don’t do that, instead using $HOME to represent your home directory. (although I have a list full of exceptions which I will get to. :). Most of my other apps, however, would refuse to work due to the file paths being wrong until I corrected them all at once using a small Perl script.

One of the largest offenders in KDE is actually my cover manager code in JuK. Not only does it save the absolute file path, but the cover cache is stored in binary for speed, so I can’t quickly fix it! So I have no covers showing up until I write a Qt program to fix the file.

Other than that, things were actually amazingly easy to copy over and have work. KDE’s good support for relative file paths made the job very simple.

Posted by mpyne under Personal & Tutorial |

3 Responses to “Migrating user data”

  1. Michaël Identicon Icon Michaël responded on 01 Feb 2007 at 08:10 #

    “The simple solution, of course, is just to copy over everything in /home to the other computer using scp or rsync and hope everything continues to work. :-).”

    Sounds easy indeed… but does that preserve all metadata, such as “time of last change” etc?

  2. mk Identicon Icon mk responded on 02 Feb 2007 at 20:46 #

    doesnt “scp -dpr” do the job?

  3. mpyne Identicon Icon mpyne responded on 02 Feb 2007 at 22:24 #

    I don’t know what -d does but -p and -r should be sufficient judging from the manpage.

    It is of course just as easy to copy directories and keep the permissions/mtimes/etc. using rsync.

Trackback URI | Comments RSS

Leave a Reply


For spam filtering purposes, please copy the number 6368 to the field below This message appears because you have JavaScript disabled or your browser does not support CSS, a standard web feature.