[LUAU] RSync help

Clifton Royston cliftonr at iandicomputing.com
Tue Jan 11 22:47:23 PST 2011


On Tue, Jan 11, 2011 at 04:24:42PM -1000, James Handsel wrote:
> Anybody out there good w/rsync?  I'm using it to sync data between an 
> office and a remote server and then running a backup on the remote 
> server and could use some help working out the kinks.

Using the -a option will almost always do what you want for this type
of application.  (use -az if you need compression on the link, -avz if
you want verbose output.)

Remember to either put a trailing / on the "from" directory to get its
contents rather than the directory itself, or to refer to the parent
directory on the "to" directory side.  Otherwise you tend to end up on
the destination with something like .../backed-up-dir/backed-up-dir.

A simple fully-worked example (assuming a typically configured rsync which
communicates over an ssh connection)

On main server:

  rsync -az /full-path/to/dir-to-backup/ \ 
	backup-account at remote-server.fqdn:/full-path/to/backup-location
  
If you want it to be non-interactive, you'll need to do some messing
with creating public/private key pairs for the sending and receiving
accounts, so that the sending machine can authenticate itself to the
remote machine.  

That part gets to be a pain and I have to figure it out again each
time.  However it's more of an ssh issue than an rsync issue; when you
can log in from the backup account on the sending server to the backup
account on the remote machine without needing to type more than "ssh",
it'll work unattended for rsync.

  -- Clifton

-- 
    Clifton Royston  --  cliftonr at iandicomputing.com / cliftonr at lava.net
       President  - I and I Computing * http://www.iandicomputing.com/
 Custom programming, network design, systems and network consulting services



More information about the LUAU mailing list