Difference between revisions of "rsync"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(→‎Links: manpages)
Line 20: Line 20:
 
* manpage: [https://linux.die.net/man/1/rsync linux.die.net] [https://ss64.com/bash/rsync.html ss64.com]
 
* manpage: [https://linux.die.net/man/1/rsync linux.die.net] [https://ss64.com/bash/rsync.html ss64.com]
 
===How To===
 
===How To===
 +
* '''2017-06-20''' [https://qbfreak.net/gs/index.php?id=blog&post=using-rsync-to-verify-file-trees-match Using rsync to verify file trees match]
 
* [http://www.mikerubel.org/computers/rsync_snapshots/ ''Easy'' Automated Snapshot-Style Backups with Linux and Rsync]
 
* [http://www.mikerubel.org/computers/rsync_snapshots/ ''Easy'' Automated Snapshot-Style Backups with Linux and Rsync]
 
* [http://www.scrounge.org/linux/rsync.html Use rsync to back up a directory tree of files]: a basic how-to
 
* [http://www.scrounge.org/linux/rsync.html Use rsync to back up a directory tree of files]: a basic how-to

Revision as of 12:27, 17 August 2018

About

rsync is a Linux command-line application for synchronizing (i.e. making sure both copies have the latest versions of all files) a directory tree between two machines.

This is a growing seedling article. You can help HTYP by watering it.

Related Pages

user pages

  • user:Woozle/rsync: full command, showing actual options we use, including machine names

Examples

Copy a directory structure from relsource on machine to reldest on the local machine:

rsync -Pav user@machine:relsource reldest
  • a is for 'archive', which is short for pr which are 'preserve' and 'recursive'
    • p ('preserve') preserves timestamps, permissions, etc.
  • v is for 'verbose', which means it tells you what it's doing
  • P is for 'progress' and 'partial', which allows for resuming an incomplete copy

Notes

  • To keep files in sync in both directions, you have to run rsync in both directions as well; there is no single command to synchronize two directory trees.
  • This probably does not also remove destination files deleted from the source.
  • To use rsync in an automated script (e.g. for backups), see keyed login for password-less operation.

Links

How To