Linux文件备份
1.tar -P是否保留根目录 -t查看压缩文件内容 -N 201401010备份日期以后
[root@localhost /]# tar -zcPf /tar/data2.tar.gz /etc/*.conf
[root@localhost /]# cd tar/
[root@localhost tar]# ll
总计 80
-rw-r--r-- 1 root root 39051 09-08 23:42 data1.tar.gz
-rw-r--r-- 1 root root 39046 09-08 23:43 data2.tar.gz
2.dump -0完全备份
3.restore恢复 -tf查看 -rf恢复
[root@localhost dump]# dump - -f /dump/data1.dump /dev/sda1
DUMP: Date of this level dump: Tue Sep ::
DUMP: Dumping /dev/sda1 (/boot) to /dump/data1.dump
DUMP: Label: /boot
DUMP: Writing Kilobyte records
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated blocks.
DUMP: Volume started with block at: Tue Sep ::
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
DUMP: Closing /dump/data1.dump
DUMP: Volume completed at: Tue Sep ::
DUMP: Volume blocks (.41MB)
DUMP: blocks (.41MB) on volume(s)
DUMP: finished in less than a second
DUMP: Date of this level dump: Tue Sep ::
DUMP: Date this dump completed: Tue Sep ::
DUMP: Average transfer rate: kB/s
DUMP: DUMP IS DONE
[root@localhost dump]#
[root@localhost boot]# restore -tf /dump/data1.dump
Dump date: Tue Sep ::
Dumped from: the epoch
Level dump of /boot on localhost.localdomain:/dev/sda1
Label: /boot
.
./lost+found
./grub
./grub/grub.conf
./grub/splash.xpm.gz
./grub/menu.lst
./grub/device.map
./grub/stage1
./grub/stage2
./grub/e2fs_stage1_5
./grub/fat_stage1_5
./grub/ffs_stage1_5
./grub/iso9660_stage1_5
./grub/jfs_stage1_5
./grub/minix_stage1_5
./grub/reiserfs_stage1_5
./grub/ufs2_stage1_5
./grub/vstafs_stage1_5
./grub/xfs_stage1_5
./initrd-2.6.-.el5.img
./.vmlinuz-2.6.-.el5.hmac
./System.map-2.6.-.el5
./config-2.6.-.el5
./symvers-2.6.-.el5.gz
./vmlinuz-2.6.-.el5
[root@localhost boot]# restore -rf /dump/data1.dump
4.cp命令制作iso文件
[root@localhost boot]# cp /dev/cdrom /dump/linux.iso
[root@localhost boot]#
[root@localhost boot]# mount -o loop /dump/linux.iso /mnt
5.dd命令 -if=输入设备 -of=输出设备
[root@localhost boot]# dd if=/dev/cdrom of=/dump/linux1.iso
[root@localhost boot]# dd if=/dev/sda of=/dev/sdb #常见的硬盘对拷
Linux文件备份的更多相关文章
- 利用FTP将Linux文件备份到Windows
windows:Windows Server 2008 linux: CentOS release 5.5 (Final) 首先在windows上安装好FTP,本人使用的是Windows ...
- linux文件备份到windows方法
目录 背景 方案 过程记录 在windows上创建共享目录 将windows上共享的目录绑定到/mnt目录下 问题处理 背景 需编写部门wiki备份数据脚本.但wiki部署在linux上,而需将备份数 ...
- Linux系统文件压缩与备份(5)
在 Linux 系统选有相当多的压缩命令可以使用,这些压缩指令可以让我们更方便的从网上下载大型文件,本章第一节内容我们就来谈谈这个 Linux 系统下常用的几种压缩格式吧. 谈完了压缩后,我们接着来说 ...
- Linux 驱动开发
linux驱动开发总结(一) 基础性总结 1, linux驱动一般分为3大类: * 字符设备 * 块设备 * 网络设备 2, 开发环境构建: * 交叉工具链构建 * NFS和tftp服务器安装 3, ...
- VERITAS NETBACKUP运维手册(自制)
ps:本文为目录.详情请点如下目录超链接 1 VERITAS NETBACKUP介绍 1.1 NBU基本概念 1.2 配置存储单元 1.3 配置备份策略(Policy) 1.4 配置NetBackup ...
- Linux基本命令(3)文件备份和压缩命令
文件备份和压缩命令 在Linux中,常用的文件压缩工具有gzip.bzip2.zip.bzip2是最理想的压缩工具,它提供了最大限度的压缩.zip兼容性好,Windows也支持. 命令 功能 bzip ...
- xfs文件备份恢复篇一vm中linux新增磁盘
XFS提供了 xfsdump 和 xfsrestore 工具协助备份XFS文件系统中的数据.xfsdump 按inode顺序备份一个XFS文件系统.centos7选择xfs格式作为默认文件系统,而且不 ...
- linux 如何把一个装好的系统做成镜像(文件备份)
linux 如何把一个装好的系统做成镜像(文件备份) 我来答 浏览 11851 次来自电脑网络类芝麻团 2016-01-19 案例1(命令式操作) 像'ghost'那些备份系统,系统出了问题就恢复 ...
- Linux命令 文件备份归档恢复
cp [功能说明] 文件的备份 英文xxxx #cp命令将源文件复制到另外安全的地方,复制的文件和源文件是两个相互独立的文件,对认识一个文件的操作不影响另一个文件,但与符号链接文件中的硬链接是有区别 ...
随机推荐
- 【转】纵表、横表互转的SQL
纵表.横表互转的SQL 原文1:http://takkymj.iteye.com/blog/751401 横表就是普通的建表方式,如一个表结构为: 主键.字段1.字段2.字段3... 如果变成纵表 ...
- unity的sprite添加点击事件
直接说方法 添加一个2dxxx的碰撞器 添加一个OnMouseDown的回调函数,这个函数看script reference就可以
- win7 安装 node-sass报错
由于国内网络问题,所以会导致下载node-sass二进制包失败 只需要在 ~/.npmrc(当前用户家目录下)添加下面一行: sass_binary_site=https://npm.taobao.o ...
- Linux操作系统多线程信号总结
linux 多线程信号编程总结 linux 多线程信号总结(一) 1. 在多线程环境下,产生的信号是传递给整个进程的,一般而言,所有线程都有机会收到这个信号,进程在收到信号的的线程上下文执行信号处理函 ...
- ubuntu 16.04安装ibus中文输入法
1. 安装IBus sudo apt-get install ibus-pinyin system settings——>language support——>keyboard input ...
- Python的设计哲学
Beautiful is better than ugly. 优美胜于丑陋 Explicit is better than implicit. 明了胜于晦涩 Simple is better than ...
- Ubuntu上装KVM:安装、初次使用
KVM 是 Linux 内核自带的虚拟机系统, 使用它,你的机器就可以变成几台机了 试用过程如下: 环境: Ubuntu 14.04 64bit 1, KVM需要CPU硬件支持虚拟化,所以首先要确认 ...
- python 爬预警没解析前的
- 阿里云短信接口python版本
# -*- coding: utf-8 -*- #!/usr/bin/python #encoding=utf-8 import sys from aliyunsdkdysmsapi.request. ...
- 「小程序JAVA实战」小程序视频上传方法的抽象复用(57)
转自:https://idig8.com/2018/09/23/xiaochengxujavashizhanxiaochengxushipinshangchuanfangfadechouxiangfu ...