1. Copy the source directory to the target end:
Rsync-Av/home/file/data/backup/file/Data
2. Back up data to a remote server or host
Rsync-Av/home/file/data [email protected]:/home/file/Data
3. Restore data from the remote server to the local host:
Rsync-AV [email protected]:/home/file/data/home/file/Data
4. When the network is used for transmission, the compressed data can display the transmission efficiency. Use-Z to specify the compression of data in the network.
Rsync-avz source destintion
5. Synchronize the content in one directory to another
Rsync-Av/home/test // home/backup
6. Take the contents including the directory itself into another directory:
Rsync-Av/home/test/home/backups
7. Use rsync to exclude some files from archiving
Rsync-avz/home/codes/some_code/mnt/Disk/backup/code -- exclude "*. txt"
Or -- exclude-from filepath can specify a file list file to be excluded
8. Delete nonexistent files when updating rsync backups
Rsync-avz source destunation -- delete
9. Regular backup
Crontab-EV
0 */10 * rsync-avz/home/code [email protected] _ address:/home/backups
This article from the "quiet fan Yin" blog, please be sure to keep this source http://mastters.blog.51cto.com/6516495/1467187
Back up system snapshots using rsync