Backup remote folders with rsync

rsync option source-directory destination-directory

Or, a better example:

rsync -chavzP --stats user@remote.host:/path/to/copy /path/to/local/storage  

And here's the full explain shell explanation

chavzP is, respectively:

  • --checksum
  • --human-readable
  • --archive (i.e. get everything, and be recursive)
  • --verbose
  • -P equivalent to --partial --progress ...good for a long transfer that may be interrupted

And

  • --stats tells rsync to print a verbose set of statistics on the file transfer

...Can backup multiple files/folders by specifying them with, for example:

rsync -e ssh root@remote.com:/path/to/file :/path/to/second/file/ /local/directory/

Can use:

--dry-run  

...to see what will be done, before executing.

Source

results matching ""

    No results matching ""