How to transfer data from one drive to another

linux-penguinIn this example we will migrate the /home directory onto the new partition...
Firstly you will need to logon using a terminal session.


Rename the /home directory

$ sudo mv /home /home-save

Create a new empty /home directory

$ sudo mkdir /home

Copy the contents of /home-save to the root directory of /dev/sdb1 which is actually /mnt/sdb1

$ sudo cp -r /home-save /mnt/sdb1

Unmount the new partition

$ sudo umount /mnt/sdb1

Edit the /etc/fstab file to change the mount point from /mnt/sdb1 to /home

$ sudo vi /etc/fstab

/dev/sdb1 /home ext3 defaults 1 2


Thanks for visiting.