LINUX系统备份与恢复

来源:互联网 发布:怎样用网络电视看直播 编辑:程序博客网 时间:2024/04/20 01:27

tar命令
tar -c|x|u|r|t[z|j][v] -f <归档文件> [未打包文件]
将多个文件打包为一个归档文件,可以在打包的同时进行压缩。支持的格式为tar(归档)、gz(压缩)、bz2(压缩率更高,比较耗时)
-c 创建
-x 解包
-u 更新
-r 添加
-t 查看
-d 比较压缩包内文件和文件
-A 将tar文件添加到归档文件中
-z 使用gz压缩格式
-j 使用bz2压缩格式
-v 显示过程

-f <文件名> 归档文件的文件名
-C <解压路径> 将压缩包中的文件解压到指定目录
[未打包文件] 创建、更新时必须填写

 

debian增量备份
差量备份和增量备份往往容易被弄混淆,不过两者之间有一个明显的区别。增量备份会
备份那些自从上次完全备份或者增量备份之后被修改过的文件,差量备份会备份自从上次完
全备份后被修改过的文件。从差量备份中恢复也是很快的,因为只需要两份磁带——最后一
次完全备份和最后一次差量备份。
1、-g参数
通过-g参数联系起来,每次只被备份变动的文件(新建和改动的文件)。可以逐步恢复.
-g指定的文件是联系各备份的关键,记录了当前文件的状态,便于下一次只备份改动。
2、完全更新文件
-u参数,需把tgz通过gunzip解压为tar才能使用
http://www.linuxidc.com/Linux/2011-01/31793.htm

 

 

 

 

 

debian系统备份与恢复
系统备份类型
1、Full Backup
Full backup is the starting point for all other backups, and contains all the d$
Backing up is the slowest.
The storage spac

.com/backup-basics-and-different-types-of-backup.html

 

备份工具
1、使用tar命令,比windows简单许多。

e requirements are the highest
Restore is the fastest.
2、Incremental Backup
Incremental backup means backing up everything that has changed since last full$
Backing up is the fastest
The storage space requirements are the lowest
Restore is the slowest
3、Differential Backup:介于full和increment之间
Differential seems to be another name for incremental.differential backup offer$
Restore is faster than restoring from incremental backup
Backing up is faster than a full backup
The storage space requirements are lower than for full backup
http://www.debianadmin.com/backup-basics-and-different-types-of-backup.html

 

备份工具
1、使用tar命令,比windows简单许多。

系统最大空间的那个目录里进行备份, 先用df -h 查看一下使用了的空间,大致估算一下$

 

例子:

tar -cvpzf /media/sda7/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys --exclude=/media /

c - 新建一个备份文档

v - 详细模式, tar程序将在屏幕上实时输出所有信息。

p - 保存许可,并应用到所有文件。

z - 采用‘gzip’压缩备份文件,以减小备份文件体积。

        f - 说明备份文件存放的路径

http://forum.ubuntu.org.cn/viewtopic.php?f=77&t=327079&p=2284905
http://unix-cd.com/vc/www/22/2010-08/15798.html
http://www.net527.cn/a/caozuoxitong/Linux/2010/0120/3968.html
2、使用sbackup工具
http://www.debianadmin.com/backup-and-restore-your-ubuntu-system-using-sbackup.$

压缩备份文件,以减小备份文件体积。

f - 说明备份文件存放的路径, /media/sda7/backup.tgz 是本例子

 

http://forum.ubuntu.org.cn/viewtopic.php?f=77&t=327079&p=2284905
http://unix-cd.com/vc/www/22/2010-08/15798.html
http://www.net527.cn/a/caozuoxitong/Linux/2010/0120/3968.html
2、使用sbackup工具
http://www.debianadmin.com/backup-and-restore-your-ubuntu-system-using-sbackup.$

dia/sda7/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys --exclude=/media /

 

tar 是用来备份的程序

c - 新建一个备份文档

v - 详细模式, tar程序将在屏幕上实时输出所有信息。

p - 保存许可,并应用到所有文件。

z - 采用‘gzip’压缩备份文件,以减小备份文件体积。

        f - 说明备份文件存放的路径, /media/sda7/backup.tgz 是本例子

http://forum.ubuntu.org.cn/viewtopic.php?f=77&t=327079&p=2284905
http://unix-cd.com/vc/www/22/2010-08/15798.html
http://www.net527.cn/a/caozuoxitong/Linux/2010/0120/3968.html

 

 

 

 

 

恢复rm删除的文件
恢复方法介绍
http://hi.baidu.com/jlusuoya/blog/item/d94316ee8842c83263d09f62.html
ext3文件系统还原rm删除的文件
http://qubaoquan.blog.51cto.com/1246748/301281
其他
http://yecheng110.blog.hexun.com/12776265_d.html

原创粉丝点击