rsync question...

Chris Green cl at isbd.net
Tue Dec 19 09:23:38 UTC 2023


On Mon, Dec 18, 2023 at 08:08:38PM -0500, bruce wrote:
> Hey/hi.
> 
> Trying to test rsync to copy all files from a remote srvr to the local
> srvr, excluding a few dirs.
> 
> I'm running the "rsync" as root, so there shouldn't be any perms/user issues.
> 
> I'm hoping that rsync maintains the user acl from the remote on the local srvr.
> 
> The cmd
> sshpass -p 'passfoo'  rsync -avr -e ssh root at 1.2.3.4:/  .
> --exclude=/sys  --exclude=/proc
> 
> shows a huge list of files.. so it's iterating through the remote
> srvr. But it's not appearing to create/copy the files to the local
> srvr.. Ie, the cases where there's no child dir, I would assume that
> rsync will create the "parent" dir to copy/insert the file.
> 
It looks about right, are you waiting long enough?  rsync works out a
list of files to copy before starting to copy them so there may be
quite a long wait before it starts the actual copying.  The 'r' in
-avr is redundant as -a includes r.

I'm not familiar with sshpass but presumably that's providing the
remote root password.

-- 
Chris Green



More information about the ubuntu-users mailing list