How to copy Home directory to 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

Sponsored Link

You may also like...

5 Responses

  1. Brett Howard says:

    Wow… Nice try but this is a pretty poor attempt at explaining this..

  2. 2S4U says:

    A simple

    cp -av /home/me /media/newhome

    does the trick directly. People nowadays keep huge collections of music and videos in their /home, so creating an intermediate archive file is a waste of time and space.

  3. Charles says:

    Yeah, uh, Method # 1 set permissions on the destination device, but never actually got to copying the files…

  4. Francesco says:

    I use this for backup:

    rscyn -Cvaz / / –delete

    a simple way to keep synchronized your managed backup

  5. Sphynx says:

    Rsync is the best way to copy files from one machine to another. Using tar to do it will take way more time than Francesco’s command.

Leave a Reply

Your email address will not be published. Required fields are marked *