[LBo] Moving Home
Anita Lewis
a.lewis at linuxbasics.org
Sat Mar 10 00:28:54 CET 2007
On 03/09/2007 06:04 PM Tim wrote:
> I am getting ready to swap distros over the weekend, I intend to copy my
> entire home directory to an external usb disk, will I need to do anything
> special with the permission, should I do anything speacial now before I swop,
> particualrly with the mail folder (I use kmail and my ISP, no mail server)??
Tim I hope others will join in on answering this and we can be sure to
give you the correct information.
Since you are changing distros, a few important things come to mind.
1. Your UID on the new distro may not be the same as on the old one. If
you look in /etc/passwd you will see a number associated with your
username. My guess is it is either 1000 or 500. I know that if I use
the same /home partition on my machine in a distro that assigns me 500
of default UID, I cannot access my files in my home directory, because
they are for user 1000 which is my UID in my main distro.
All you have to do regarding that is to change the UID. Look at
'man usrmod' to see how that is done. You would do that in the new
distro if the UID is not the same as on your old distro.
2. The usb disk - will the partition where you are putting your home
directory be ext2? If it is formated vfat, it will not hold the
permissions and so on.
3. If you are going to copy the directory 'tim' or whatever it is, to
that drive, use 'cp -a' which will get recursive, permissions, and
links. Take a look at 'man cp' on that.
4. When you do the new distro, consider making a separate /home
partition if you can. That way next time you change, you will not have
to do this process. You will only have to check the UID and mount the
/home partition.
5. tar is a possibility, but you doing 'cp -a' with the appropriate
directory should work well. Be sure that you umount that usb hard drive
before you assume everything is on it. I would use commandline and not
drag and drop.
6. If you are particularly concerned about your mail folder, it might
be good to make a separate copy of that for added insurance. I backup
mine every morning with a couple of other things.
Anita
More information about the QnA
mailing list