D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] move user data and settings to new hard disk

 

On Mon, 14 Jun 2010, kevin wrote:

I would use Rsync

something like
rsync -avz /home/user/  /seconddisk/home/firtdiskuser/

press return and watch it fly across

you can omit stuff you don't need ie

--exclude "*~"

I use rsync a lot, but lets not complicate things here. For doing a one-off copy from one partition/disk to another, go back to basics and just do this:

  cp -a /home/user /seconddisk

It's much faster than rsync. Your paramaters 'z' asks it to compress and that's just going to waaste even more cpu time than rsync already does.

One issue you may face is copying links - hard or symbolic. You need the -H flag in rsync to cope with hard links. cp will just copy the files, however you're unlikely to have hard links in your /home area, but you never know!

Gordon

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html