Ubuntu Perfect file backup solution: 1, the backup partition file format must be ext4 format; 2, install pdumpfsapt-getinstallpdumpfs3, Backup command: pdumpfs-Parameter/home/home1 parameter description: -- exclude = directory excluded by PATTERN -- exclude-by-size = 30m30M or above -- exclude-by-glob = "*. exe "suffixed with exe
Ubuntu Perfect file backup solution:
1. The format of the backup partition file must be ext4;
2. Install pdumpfs
Apt-get install pdumpfs
3. Backup command:
Pdumpfs-Parameter/home/home1
Parameter description:
-- Exclude = directories excluded by PATTERN
-- Exclude-by-size = 30 m 30 m or more file exclusion
-- Exclude-by-glob = "*. exe" excluded files with the extension name exe
-Q: Quiet backup. No information is displayed on the terminal.
Assume that you want to back up files in/home to/home1.
The backup command is:
Pdumpfs/home/home1
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
4. Automatic Backup:
Vi/etc/crontab
Add a row:
# Minute Hour Date month week execute User Execute Command
0 22 *** root pdumpfs/home/home1
Indicates that a backup is performed at every day.
0 22 ** 0 root pdumpfs/home/home1
Indicates that a backup is performed at every Sunday.
0 22, 11, 21 ** root pdumpfs/home/home1
Indicates that each backup is performed at on the first day of every month.
Extract backup data:
For example, to extract files from 2008/11 to, you only need to enter/home1/30/home to see a directory structure identical to/home.