Rsync
Jump to navigation
Jump to search
Some tips for using rsync.
Rsync server
This can be useful to copy between nodes on RACF which do not allow node-to-node SSH. The example assumes one is running as user dayabay on RACF.
Make a config file
dayabay@daya0001:~> cat d2dcp.cfg # rsync configuration file for host-to-host copying port = 6969 address = daya0004 use chroot = no [data4tmp] comment = test this crazy thing path = /data4/tmp read only = no
Additional destination stanzas can be added. The stanza name is used in the rsync URL below.
Start server
Log in to the machine where you want files to go. Start the server like:
dayabay@daya0004:~> rsync --config=d2dcp.cfg --daemon --no-detach
Client side things
Run the client on the machine with the areas to copy. To list what is already on the destination:
rsync rsync://daya0004:6969/data4tmp/
Note, the host, port and location must match what the server reads from the config file.
To copy a source location to the server:
dayabay@daya0001:~> rsync -a -v somedirecotry rsync://daya0004:6969/data4tmp/
(leave off the "-v" for a quieter command).
Check:
dayabay@daya0001:~> rsync rsync://daya0004:6969/data4tmp/ drwxr-xr-x 4096 2012/12/07 12:28:22 . drwxr-sr-x 4096 2011/05/05 09:38:50 somedirectory
Stop the server
When done do a Ctrl-C on the server to make it exit.