Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I need to change the location of the /home to a new drive/partition. I have partitioned, mkfs and mounted the new drive to /mnt. My question is what is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2012
    Posts
    1

    Moving /home proper way to copy files over


    Hi, I need to change the location of the /home to a new drive/partition. I have partitioned, mkfs and mounted the new drive to /mnt.

    My question is what is the correct command to copy from /home to the new home /mnt?

    do I use cp with switches to catch hidden/links etc or use a variant for find command piped to a copy type utility?

    obviously, vp -R /home/* /mnt will not do the job.

    Thanks.

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,257
    A lot of people do this sort of thing with cpio. cpio is similar to tar but it has a "copy-pass" mode in which no archive is actually created. Instead files pass through cpio to their new location with ownership and permissions intact. Have a look at the cpio man page for details.
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  3. #3
    Linux Newbie theNbomr's Avatar
    Join Date
    May 2007
    Location
    BC Canada
    Posts
    155
    rsync also works well for that purpose, and can be re-run efficiently if need be.

    --- rod.
    Stuff happens. Then stays happened.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •