Hi Clive- I find with commands like Rsync I remember recipes and use them all the time.
I used to use *rsync -avcz *for everything ... -a includes -r so you don't need both -v gives you more output. -c makes it checksum the files rather than looking only at file size and datestamp, so is safer but a lot slower. Optional, depending on circumstance. Perhaps use the first time if repairing a broken copy, otherwise don't bother. -z compresses the data over the wire, only useful over the network and probably slows things down if not So often -av is a better, faster choice. I also now often add -HAX after a few "mishaps" ... -H include hard links -A include ACLS (extended file permissions) -X include xattrs These generally do no harm and occasionally will be essential. So, in your case *rsync -avHAX* might be appropriate. One more gotcha... in the source spec for rsync, the trailing / or lack of it is significant So: *rsync -avHAX sda3/home sdb4/home *will copy the home directory itself to sdb4/home/home *rsync -avHAX sda3/home/ sdb4/home *will copy the *contents* of the home directory to sdb4/home I expect the latter is what you want. Doing it from a live disk is guaranteed safe, so is preferable. Otherwise, you can boot in single user or rescue mode and repeat the rsync command a few times to catch any differences that happen during the first pass. Good luck! On 21 July 2015 at 11:51, C Wills <ci...@cewland.uk> wrote: > Please can anyone confirm the following statement as I've not used rsync > before. > > sudo rsync -r -a sda3/home sdb4/home > > I'm trying to copy the Home folder (on sda3) containing 2 users onto > another disc (sdb4) mounted in the same computer (ie not remote). I want > to keep all permissions on all files in all directories and sub-directories. > I think the -r ensures all files are copied, and -a keeps the attributes > (ownerships ect) > Partitions are already made on both discs but sdb is not normally mounted > at start-up. > > Reason is a partial upgrade of the operating system which is on sda1 of > the first disc. > Will using rsync take long to move 52Gb of data? (1 or 2 hrs?) > Is it safe to do this while sda is mounted or should I do it from a live > disc? > -- Next meeting: Bournemouth, Tuesday, 2015-08-04 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ New thread: mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING Reporting bugs well: http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR