Thursday, April 29, 2010

Ubuntu: Copy Home Directory To a New Hard Drive

I have posted a guide on putting the root and home directories on separate partitions. This allows you to install Ubuntu fresh on the root partition as many times as you want, while leaving your home directory (where your files and settings are stored) untouched.

Ubuntu Geek has posted a guide on how to copy the home directory over to a new hard drive.





We have already discussed about how to create separate /home partition.This tutorial will explain How to copy Home directory to new hard drive
Method 1
Open a Terminal. Applications> Accessories> Terminal
sudo chown -R username:usergroup /media/drivename
username:usergroup should be replaced with your username. If you set up the user accounts or are the only user then user group will be the same as your username.
drivename will be along string of numbers. You can find it by going to Places> Computer> filesystem> /media. Make sure you get the proper one, becoming owner of your OS partition will cause …issues.
Here’s what sample code would look like (obviously this one won’t work for you):
sudo chown -R username:username /media/8ea1854b-da0d-4dda-93cb-5996cfb0d6c8
Method 2
you create a compressed backup of your home folder using the following command
tar -cvpzf backup-home.tar.gz /home/
you can unpack it on your new system like this:
tar -xvpf backup-home.tar.gz

No comments: