Re: copy home folder



On 07/14/2009 04:46 PM, Brian McKee wrote:
On Tue, Jul 14, 2009 at 6:59 AM, Asad<asad2k6@xxxxxxxxxxx> 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@remote_computer:~/ .
That uses scp to recursively copy (the -r) the user's home folder (~)
to here (.)

2 - rsync - e.g. rsync -avz user@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.


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: Accepting only known clients to connect using ssh
    ... >> clients, connecting using ssh, whos public keys I know of already. ... > the home folder, SSH is a little picky about that if I recall. ...
    (comp.os.linux.security)
  • Re: copy home folder
    ... what ssh command to copy an entire home folder? ... Like scp above, but has the advantage that if you re-run it, or it ... user is changing files you can't ...
    (Ubuntu)
  • Re: ssh and pam_mkhomedir
    ... The same proble using system-auth or the ssh specific file. ... I found out that granting write access to users to the /home directory ... the home folder is created. ...
    (linux.redhat.install)
  • Re: Novice Setup Guide
    ... > Is there a guide to SSH for a first time user? ... > I am trying to setup access to my home folder to one particular authorized ... There's also a Linux Security ...
    (comp.security.ssh)