rsync is my friend

rsync -av username@host:sourcedir/ destdir/

e.g.

rsync -av andy@apac.com:~/ ~/mybackupfolder/monday1/

The slashes on the ends specify to copy the contents of the folders and not the folders themselves.

To use wildcards, use –include and –exclude flags e.g. rsync -avtubz –include=’/sa_*’ –exclude=’/*’ ac@source.com:~/ ~/backup/

Include arguments override subsequent exclude arguments.

http://blogs.warwick.ac.uk/chrismay/entry/idiots_guide_to/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: