Back up system snapshots using rsync

Source: Internet
Author: User

1. Copy the source directory to the target end:


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:


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


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

Back up system snapshots using rsync

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.