Linux dump命令
来源:互联网 发布:淘宝晒图怎么删除 编辑:程序博客网 时间:2024/05/01 21:11
dump - ext2/3 filesystem backup 在使用dump进行备份的时候,可以使用不同的备份等级(level), 当使用level 0进行备份的时候,就是最初的完整备份,然后可以再使用level 1对在进行了level 0备份后的基础上,对有改动的地方进行备份,依次类推level 2......。dump不仅可以针对整个文件系统进行备份,也可以针对单一目录进行备份,但是在对单一目录进行备份的时候,就不支持使用备份等级,就只能使用最初的完整备份(level 0)
命令格式:dump [-Suvj] [-level] [-f 备份档] 待备份资料 更多详细信息,可以参考man dump页面,友情链接:Linux restore命令
参数说明:
- -S:仅列出后面的待备份数据需要多少磁盘空间才能够备份完毕
- -u:将这次dump的时间记录到/etc/dumpdates文件中
- -v:显示dump的备份过程
- -j:加入bzip2的支持!将数据进行压缩,默认bzip2压缩等级为2,如果不用-j参数,dump默认是不会使用压缩功能
- -level:备份等级,从-0~-9共十个等级,对单一目录进行备份,就只能用-0参数进行备份
- -f:有点类似tar命令,后面接产生的档案,也可以接例如/dev/st0装置文件名
- -W:列出在/etc/fstab里面的具有dump设定的partition是否有备份过
针对整个文件系统进行备份
[root@rhel6164 ~]# dump -u0j -f /tmp/boot.bakup /boot DUMP: Date of this level 0 dump: Thu Dec 25 09:21:28 2014 DUMP: Dumping /dev/vda1 (/boot) to /tmp/boot.bakup 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 21510 blocks. DUMP: Volume 1 started with block 1 at: Thu Dec 25 09:21:28 2014 DUMP: dumping (Pass III) [directories] DUMP: dumping (Pass IV) [regular files] DUMP: Closing /tmp/boot.bakup DUMP: Volume 1 completed at: Thu Dec 25 09:21:35 2014 DUMP: Volume 1 took 0:00:07 DUMP: Volume 1 transfer rate: 2761 kB/s DUMP: Volume 1 21590kB uncompressed, 19328kB compressed, 1.118:1 DUMP: 21590 blocks (21.08MB) on 1 volume(s) DUMP: finished in 7 seconds, throughput 3084 kBytes/sec DUMP: Date of this level 0 dump: Thu Dec 25 09:21:28 2014 DUMP: Date this dump completed: Thu Dec 25 09:21:35 2014 DUMP: Average transfer rate: 2761 kB/s DUMP: Wrote 21590kB uncompressed, 19328kB compressed, 1.118:1 DUMP: DUMP IS DONE[root@rhel6164 ~]# cat /etc/dumpdates #备份信息/dev/vda1 0 Thu Dec 25 09:21:28 2014 +0800[root@rhel6164 ~]# touch /boot/testing #修改/boot内容[root@rhel6164 ~]# dump -u1j -f /tmp/boot.bakup1 /boot #重新备份 DUMP: Date of this level 1 dump: Thu Dec 25 09:24:08 2014 DUMP: Date of last level 0 dump: Thu Dec 25 09:21:28 2014 DUMP: Dumping /dev/vda1 (/boot) to /tmp/boot.bakup1 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 47 blocks. DUMP: Volume 1 started with block 1 at: Thu Dec 25 09:24:08 2014 DUMP: dumping (Pass III) [directories] DUMP: dumping (Pass IV) [regular files] DUMP: Closing /tmp/boot.bakup1 DUMP: Volume 1 completed at: Thu Dec 25 09:24:08 2014 DUMP: 50 blocks (0.05MB) on 1 volume(s) DUMP: finished in less than a second DUMP: Date of this level 1 dump: Thu Dec 25 09:24:08 2014 DUMP: Date this dump completed: Thu Dec 25 09:24:08 2014 DUMP: Average transfer rate: 0 kB/s DUMP: Wrote 50kB uncompressed, 11kB compressed, 4.546:1 DUMP: DUMP IS DONE[root@rhel6164 ~]# cat /etc/dumpdates #备份信息/dev/vda1 0 Thu Dec 25 09:21:28 2014 +0800/dev/vda1 1 Thu Dec 25 09:24:08 2014 +0800[root@rhel6164 ~]# ll /tmp/* | grep boot #备份文件-rw-r--r-- 1 root root 19792161 Dec 25 09:21 boot.bakup-rw-r--r-- 1 root root 11299 Dec 25 09:24 boot.bakup1
针对单一目录进行备份
[root@rhel6164 ~]# dump -0j -f /tmp/etc.bakup /etc #这里只能用-0参数进行最初的完整备份 DUMP: Date of this level 0 dump: Thu Dec 25 09:33:36 2014 DUMP: Dumping /dev/mapper/vg_rhel6164-lv_root (/ (dir etc)) to /tmp/etc.bakup 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 38493 blocks. DUMP: Volume 1 started with block 1 at: Thu Dec 25 09:33:37 2014 DUMP: dumping (Pass III) [directories] DUMP: dumping (Pass IV) [regular files] DUMP: Closing /tmp/etc.bakup DUMP: Volume 1 completed at: Thu Dec 25 09:33:46 2014 DUMP: Volume 1 took 0:00:09 DUMP: Volume 1 transfer rate: 1196 kB/s DUMP: Volume 1 43970kB uncompressed, 10765kB compressed, 4.085:1 DUMP: 43970 blocks (42.94MB) on 1 volume(s) DUMP: finished in 9 seconds, throughput 4885 kBytes/sec DUMP: Date of this level 0 dump: Thu Dec 25 09:33:36 2014 DUMP: Date this dump completed: Thu Dec 25 09:33:46 2014 DUMP: Average transfer rate: 1196 kB/s DUMP: Wrote 43970kB uncompressed, 10765kB compressed, 4.085:1 DUMP: DUMP IS DONE
0 0
- Linux dump命令详解
- Linux dump命令
- Linux中dump和restore命令详解
- LINUX 中的 dump 和 restore 命令
- linux dump
- linux中的strace命令简介------定位core dump问题
- dump命令--Linux命令应用大词典729个命令解读
- Oracle常用dump命令
- Oracle 常用dump命令
- Oracle常用dump命令
- Oracle 常用dump命令
- Oracle常用dump命令
- Oracle常用dump命令
- Oracle 常用dump命令
- Oracle常用dump命令
- Oracle 常用dump命令
- Oracle常用dump命令
- mysql dump 命令使用
- MFC Radio Button 使用 分组 RadioButton 用法
- Linux网络常用命令
- xcode 6 Adaptive Segues的Push的使用
- HDU 2156 分数矩阵
- JSP自定义标签开发入门
- Linux dump命令
- 面试题(二) 单例模式
- Codeforces Round #280 (Div. 2)E good
- eclipse无法安装最新adt的解决方法
- mac(osx) apache无法启动 localhost无法访问服务器
- 程序员干到30岁
- 【大话】六大原则
- Android中的fill_parent、match_parent、wrap_content
- 调用相机并把照片保存到指定路径------