copy home folder

NoOp glgxg at sbcglobal.net
Wed Jul 15 01:45:17 UTC 2009


On 07/14/2009 04:46 PM, Brian McKee wrote:
> On Tue, Jul 14, 2009 at 6:59 AM, Asad<asad2k6 at hotmail.com> wrote:
>>
>> what ssh command to copy an entire home folder? What if a user is already
>> logged in would its home folder copy fail ?
> 
> Lots of ways to do that.  ssh doensn't require anything 'special' -
> it's just like you were using the terminal locally.  Unless you mean
> 'use ssh to copy home folder to another computer'.  In that case you
> have two obvious choices (and lots of less obvious ones)
> 
> 1 - scp - e.g. scp -r user at remote_computer:~/ .
> That uses scp to recursively copy (the -r) the user's home folder (~)
> to here (.)
> 
> 2 - rsync - e.g. rsync -avz user at remote_computer:~/ .
> Like scp above, but has the advantage that if you re-run it, or it
> gets interupted, it can pick up from where it left off.

Wouldn't that be: Unlike scp above, rsync has the advantage that if you
re-run it, or it gets interupted, it can pick up from where it left off?

Note sftp also has the advantage of picking up where it left off from an
interuption.

> 
> If the user is logged in it will still work.  Note however that if the
> user is changing files (i.e. doing almost anything) you can't
> guarantee that you will get the newest version, or a coherent set of
> files, as you don't know if it was copied before or after they changed
> it.





More information about the ubuntu-users mailing list