[root@localhost ~]# df -h
文件系统 容量 已用 可用 已用 % 挂载点
- /dev/sda3 20G 3.0G 16G 17% /
- tmpfs 30 6M 0 30 6M 0% /dev/shm
- /dev/sda1 194M 26M 158M 15% /boot
- /dev/sr0 3.5G 3.5G 0 100% /mnt/cdrom
- # 系统中我们就分了 / 分区和 / boot 分区. 根分区太大, 备份速度太慢, 我们还是备份 / boot 分区吧
- [rootSlocalhost ~]# dump -Ouj -f /root/boot.bak.bz2 /boot/
- # 备份命令. 先执行一次完全备份, 并压缩和更新备份时间
- DUMP: Date of this level 0 dump: Wed Jun 5 03:08:22 2013
- # 备份的级别和时间
- DUMP: Dumping /dev/sdal (/boot) to /root/boot.bak.bz2
- # 备份源和目标
- DUMP: Label: none
- # 分区没有卷标
- DUMP: Writing 10 Kilobyte records
- DUMP: Compressing output at compression level 2 (bzlib)
- # 备份时压缩
- DUMP: mapping (Pass I) [regular files]
- DUMP: mapping (Pass II) [directories]
DUMP: estimated 21846 blocks.
- DUMP: Volume 1 started with block 1 at: Wed Jun 5 03:08:22 2013
- DUMP: dumping (Pass III) [directories]
- # 开始 dump 备份
- DUMP: dumping (Pass XV) [regular files]
- DUMP: Closing /root/boot.bak.bz2
- # 备份结朿, 生成备份文件
- DUMP: Volume 1 completed at: Wed Jun 5 03:08:30 2013
- DUMP: Volume 1 took 0:00:08
- DUMP: Volume 1 transfer rate: 2370 kB/s
- DUMP: Volume 1 21930kB uncompressed, 18962kB compressed, 1.157:1
- # 数据容量
- DUMP: 2X930 blocks (21.42MB) on 1 volume(s)
- DUMP: finished in 7 seconds, throughput 3132 kBytes/sec
- DUMP: Date of this level 0 dump: Wed Jun 5 03:08:22 2013
- DUMP: Date this dump completed: Wed Jun 5 03:08:30 2013
- DUMP: Average transfer rate: 2370 kB/s
- DUMP: Wrote 21930kB uncompressed, 18962kB compressed, 1.157:1
- [root@localhost ~]# cat /etc/dumpdates
- # 查看备份时间文件
- /dev/sdal 0 Wed Jun 5 03:08:22 2013 +0800
- # 备份的分区 备份级别 备份曰期
- [root@localhost @]# 11 -h /root/boot.bak.bz2
-rw-r--r--. 1 root root 19M 6 月 5 03:08 /root/boot.bak.bz2
# 备份文件生成了
来源: http://www.bubuko.com/infodetail-2945956.html