Linux Server File backup

Source: Internet
Author: User
Tags glob domain server
Linux Server File backup-Linux Enterprise Application-Linux server application information. For details, refer to the following section. There are more and more files on the Domain Server. No matter how large the space is, colleagues can always fill it up.
How to perform a Secure Backup has always been around me. After a long comparison, we finally decided on a tool called pdumpfs, which was written in ruby, ruby is an object-oriented scripting language similar to bython, and it has a long history,
Pdumpfs can save a snapshot of a file directory every day. In hard connection mode, the file directory status is saved every day with a small amount of hard disk space, use year/month/day as the directory name. To restore the file directory of a certain day, you only need to enter the corresponding directory. this is a perfect solution for file backup.

Http://anheng.com.cn/news/html/net_admin_blog/471.html

Debian is easy to install:
Apt-get install pdumpfs
Http://anheng.com.cn/news/html/net_admin_blog/471.html

Assume that you want to back up files in/home to/home1.
The backup command is:
Pdumpfs/home/home1
Http://anheng.com.cn/news/html/net_admin_blog/471.html

Add a line in/etc/crontab for each automatic operation:
* Root pdumpfs/home/home1
In this way, backups can be automatically run at and every day,
Http://anheng.com.cn/news/html/net_admin_blog/471.html

Advanced usage:
Limit the file size. If the file size exceeds 30 mb, no backup is performed:
Pdumpfs -- exclude-by-size 30 M/home/home1
Exclude *. CAB, *. cab, *. exe:
Pdumpfs -- exclude-by-glob "*. CAB "-- exclude-by-glob "*. cab "-- exclude-by-glob "*. exe "-- exclude-by-size 30 M/home/home1
Http://anheng.com.cn/news/html/net_admin_blog/471.html

Run automatically, back up and mail the backup information to the Administrator:
2 19 *** root pdumpfs -- exclude-by-glob "*. CAB "-- exclude-by-glob "*. cab "-- exclude-by-glob "*. exe "-- exclude-by-glob "*. EXE "-- exclude-by-glob "*. zip "-- exclude-by-glob "*. ZIP "-- exclude-by-size 30 M-q-l/tmp/bak. log/home/home1; sendmail shiwei@cfido.comHttp://anheng.com.cn/news/html/net_admin_blog/471.html

Extract backup data:
For example, to extract files from 2004/11-11-30, you only need to enter/home1/30/home, and you can see a directory structure identical to/home.
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.