Linux command
dump 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Backup filesystem to file
dump -0uf [/backup/root.dump] [/dev/sda1]
Backup with compression
dump -0uf - [/] | gzip > [backup.dump.gz]
Incremental backup (level 1)
dump -1uf [/backup/root.1.dump] [/]
Backup to tape device
dump -0uf [/dev/st0] [/home]
List files in dump archive
restore -tf [backup.dump]
说明
dump creates backups of ext2/ext3/ext4 filesystems. It operates at the filesystem level, reading disk blocks directly, which provides complete backups including file metadata and special files. Dump supports incremental backups through levels 0-9. Level 0 is a full backup; higher levels back up files changed since the last backup at a lower level. The /etc/dumpdates file tracks backup history.
参数
- -0 through -9
- Dump level; 0 is full, 1-9 are incremental.
- -u
- Update /etc/dumpdates after successful dump.
- -f _file_
- Output file or device.
- -a
- Auto-size; bypass tape length calculation.
- -h _level_
- Honor nodump flag for levels above this.
- -L _label_
- Label for dump volume.
- -z _level_
- Compress output with zlib.
- -M
- Multi-volume; prompt for new tape.
FAQ
What is the dump command used for?
dump creates backups of ext2/ext3/ext4 filesystems. It operates at the filesystem level, reading disk blocks directly, which provides complete backups including file metadata and special files. Dump supports incremental backups through levels 0-9. Level 0 is a full backup; higher levels back up files changed since the last backup at a lower level. The /etc/dumpdates file tracks backup history.
How do I run a basic dump example?
Run `dump -0uf [/backup/root.dump] [/dev/sda1]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -0 through -9 do in dump?
Dump level; 0 is full, 1-9 are incremental.