Linux uses the tar command-g parameter to make incremental + differential backups, restore files

Source: Internet
Author: User

Original link: http://www.cnblogs.com/gnuhpc/

Full backup:

Establish test paths and files

mkdir Test Touch Test/{a,b,c}

Generate three files under test

Perform a full backup

tar -G snapshot-zcf backup_full. tar. GZ test

View Tarball Content

tar ztf backup_full. Tar . Gztest/Test/atest/btest/C

Differential + Incremental Backup:

Add a file and modify the contents of a file

Touch test/eecho123 > test/a

Perform a second incremental backup (note tarball file name)

tar -G snapshot-zcf backup_incremental_2. tar. GZ test

View Tarball Content

tar ztf backup_incremental_2. Tar . Gztest/Test/atest/E

Restore Backup data:

Clear test data

RM -RF Test

Start a data restore

tar zxf backup_full. Tar . GZ tar zxf backup_incremental_1. Tar . GZ tar zxf backup_incremental_2. tar. gz

View Test Data

ls Testa b c D e

By this end
In addition, there is a slightly more complicated
Http://blog.sina.com.cn/s/blog_4ac65f6f0100d4vu.html

http://seanlook.com/2014/12/08/tar_backup_filesystem/

Linux uses the tar command-g parameter to make incremental + differential backups, restore files

Related Article

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: info-contact@alibabacloud.com 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.