Re: [Dorset] Hello from a new member in Bournemouth
> Hello Just a quick email to introduce myself. Currently running SUSE. > > Stephen Bell Stephen was at the last meeting, up the end of the table with Tim, Natalie and me, for those of you that were down the other end. :-) Cheers, Ralph. -- 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
Re: [Dorset] Hello from a new member in Bournemouth
Welcome aboard... On 21 Jul 2015 18:09, "Stephen Bell" wrote: > Hello Just a quick email to introduce myself. Currently running SUSE. > > Stephen Bell > > -- > 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 > -- 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
[Dorset] Hello from a new member in Bournemouth
Hello Just a quick email to introduce myself. Currently running SUSE. Stephen Bell -- 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
Re: [Dorset] Copying directories between discs
Hi John, > -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 ... > -H include hard links > -A include ACLS (extended file permissions) > -X include xattrs My mnemonic list of options to start with has grown to -PacivHAXs, with a -S sometimes thrown in too. :-) Cheers, Ralph. -- 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
Re: [Dorset] Copying directories between discs
On 21/07/15 13:07, John Carlyle-Clarke wrote: > > 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. > If there are large files therein then the --progress option can give you re-assuring feedback too :-) Simon -- 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
Re: [Dorset] Copying directories between discs
( crossing with John's post, and largely consistent with it... :-) Ralph's right that you can probably use 'cp' rather than rsync, but it's not a great overhead and would mean that you could then do the same another time to keep b up to date with a. You need to have the 'recursive' option set for 'cp', but -a includes that so you're OK. If you use rsync you have to watch out for the distinction between a directory as a file in itself and a directory as a directory as a folder of other files. The command you give above: sudo rsync -r -a sda3/home sdb4/home (from root directoiry '/' presumably) will give you a destination structure /sdb4/home/home/user1 and /sdb4/home/home/user2 if sdb4/home already exists. On the other hand, sudo rsync -r -a sda3/home/ sdb4/home should give you a destination structure /sdb4/home/user1 and / sdb4/home/user2 as will sudo rsync -r -a sda3/home/* sdb4/home On 21 July 2015 at 12:42, Ralph Corderoy wrote: > Hi Clive, > > > sudo rsync -r -a sda3/home sdb4/home > > Since source and destination are on the same machine, and you're not > trying to update an old copy to match an original that's since changed, > you may as well use cp(1). > > Probably, > > sudo cp -a --preserve=all --sparse=always /home /mnt/sdb4/home > > assuming /dev/sdb4 is mounted at /mnt/sdb4, adjust to suit, and that > /mnt/sdb4/home doesn't already exist, e.g. another home will be put > inside it. (Please correct me if I'm wrong, everyone else. :-) > > > Reason is a partial upgrade of the operating system which is on sda1 > > of the first disc. > > So is this just a backup in case things go awry? > > > Will using rsync take long to move 52Gb of data? (1 or 2 hrs?) > > Quite a bit less than that, I'd have thought. > > > Is it safe to do this while sda is mounted or should I do it from a > > live disc? > > You need /dev/sda3 mounted so /home is visible as a bunch of directories > and files. From a live disk you could copy the sda3 partition to a > partition on sdb; that would be a byte for byte copy, not caring that > it has a filesystem on it. Depends what your end aim is. > > Cheers, Ralph. > > -- > 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 > -- best regards, 웃 Victor Churchill, Bournemouth -- 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
Re: [Dorset] Copying directories between discs
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 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
Re: [Dorset] Copying directories between discs
Hi Clive, > sudo rsync -r -a sda3/home sdb4/home Since source and destination are on the same machine, and you're not trying to update an old copy to match an original that's since changed, you may as well use cp(1). Probably, sudo cp -a --preserve=all --sparse=always /home /mnt/sdb4/home assuming /dev/sdb4 is mounted at /mnt/sdb4, adjust to suit, and that /mnt/sdb4/home doesn't already exist, e.g. another home will be put inside it. (Please correct me if I'm wrong, everyone else. :-) > Reason is a partial upgrade of the operating system which is on sda1 > of the first disc. So is this just a backup in case things go awry? > Will using rsync take long to move 52Gb of data? (1 or 2 hrs?) Quite a bit less than that, I'd have thought. > Is it safe to do this while sda is mounted or should I do it from a > live disc? You need /dev/sda3 mounted so /home is visible as a bunch of directories and files. From a live disk you could copy the sda3 partition to a partition on sdb; that would be a byte for byte copy, not caring that it has a filesystem on it. Depends what your end aim is. Cheers, Ralph. -- 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
[Dorset] Copying directories between discs
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? -- *C A Wills* /Supporting Linux Mint & Open Source/ -- 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