Ubuntu – How to copy the home directory

home-directory

I have an access problem with ICE I cant boot as my user.
So I thought that maybe I could save my home directory Into w7 partition would be easiest I guess and upgrade from 11.10 to 12.04
Can someone run me through copying my home directory over to w7 partition of suggest where to save it please.
what should I write to copy it already as antony@antony-305V4a-305V5A
Thanks

Best Answer

I used so far the following command:

tar -cvf - /home/your_username/ | split -b 2000m -d -a 3 - /media/backup.tar

As you said you have 12 GB to copy you should have 12 GB of free space on this usb-stick/drive.

To copy the files back to its orig place you just move them back to your home/username folder. Therefore you type in a console that you open in your /home/your_username folder:

cat /media/backup.tar.* | tar -xvf -

terms:

  • your_username = your username
  • media = Your path to your usb stick.

You could also copy to your win partiton. But I am not really a friend of that cuz even your win might get damaged somehow. But if you still prefer that you will have to mount your win partition first (if not done already) and then write the files there. (just adjust the commands accordingly)

But I have to admit I never mounted my NTFS partition in Ubuntu. But it should be somehow like the following:

sudo mkdir /media/win123
sudo mount -t ntfs -o umask=007,gid=1000,uid=1000,nls=utf8 /dev/your_ntfs_part /media/win123

after you copied:

sudo umount /media/win123

But I am not a Linux -> NTFS expert. Might be you need NTFS-3G. So best thing will be putting your backup on a normal VFAT32 drive.

I hope I did nothing forget. But as others might read it here they are welcome to comment on it.

BUT I have never tried that out of recovery mode. So wait until you have your CD at hand. But if it works in recovery just report back here please cuz others might need that info once as well.

Good luck!

Related Question