Just to flesh out Simon's answer, rsync
is the perfect tool for the job:
Rsync is a fast and extraordinarily versatile file copying
tool. It can copy locally, to/from another host over any
remote shell, or to/from a remote rsync daemon. It offers a
large number of options that control every aspect of its
behavior and permit very flexible specification of the set of
files to be copied. It is famous for its delta-transfer algo‐
rithm, which reduces the amount of data sent over the network
by sending only the differences between the source files and
the existing files in the destination. Rsync is widely used
for backups and mirroring and as an improved copy command for
everyday use.
Assuming you have ssh access to the remote machine, you would want to do something like this:
rsync -hrtplu path/to/local/foo user@remote.server.com:/path/to/remote/bar
This will copy the directory path/to/local/foo
to /path/to/remote/bar
on the remote server. A new subdirectory named bar/foo
will be created. If you only want to copy the contents of a directory, without creating a directory of that name on the target, add a trailing slash:
rsync -hrtplu path/to/local/foo/ user@remote.server.com:/path/to/remote/bar
This will copy the contents of foo/
into the remote directory bar/
.
A few relevant options:
-h, output numbers in a human-readable format
-r recurse into directories
-t, --times preserve modification times
-p, --perms preserve permissions
-l, --links copy symlinks as symlinks
-u, --update skip files that are newer on the receiver
--delete delete extraneous files from dest dirs
-z, --compress compress file data during the transfer
-C, --cvs-exclude auto-ignore files in the same way CVS does
--progress show progress during transfer
--stats give some file-transfer stats
rsync
yet? Maybe on a small set of files or so? Should be the ideal tool for that. – slhck Mar 26 '13 at 18:14tar cz | ssh user@example.com tar xz
– Aesin Mar 27 '13 at 1:00rsync
for subsequent updates) : "Never underestimate the bandwidth of a station wagon full of tapes" (ie: have you considered placing a 2nd hd (or plug a usb2/usb3 disk), backup on it, and send that one via fedex to the remote location? It could be MUCH faster than anything else, and save bandwidth for other uses. – Olivier Dulac Mar 27 '13 at 9:10