IT门户, 中国互联网人工智能物联网行业资讯平台--公众IT
新闻来源:互联网资料整理       发布时间:2023/4/6 8:11:29       共计:4633 浏览

linux更新包时怎样备份?

答具体方法如下

1、保留权限

2、适合备份整个目录

3、可以选择不同的压缩方式

4、如果选择不压缩还能实现增量备份,部份还原,参考man tar

A备份

如果要备份/home这个目录,备份文件保存在/backup(可以把一个独立的分区挂载在这里),则如下命令:使用无压缩的,速度很快

以下是引用片段:

tar -cpf /backup/home.bak.tar /home

使用gzip压缩的,速度一般,通常使用这个

以下是引用片段:

tar -cpzf /backup/home.bak.tar.gz /home

使用bzip2压缩的,速度慢,但比gzip的版本小约5%。

以下是引用片段:

tar -cpjf /hackup/home.bak.tar.bz2 /home

其中第二个参数介绍如下:

c新建

p保留权限

z用gzip处理

j用bzip2处理

f后紧跟文件名

也可以加上v使备份过程显示在终端上。

B还原

以下是引用片段:

tar ——overwrite -xpf /backup/home.bak.tar -C /

k3b(光盘)

特点

一切都自己来做,对文件的选择性更好

备份、还原

没什么好说的了,使用k3b自己做光盘,自己负责把要还原的文件还原。

dd

特点

1、对块进行操作,能备份整个硬盘(包括分区表、MBR,其他Linux不能很好支持的文件系统)

2、可以进行压缩(麻烦一点)

3、由于是备份整个硬盘,文件系统上没有使用的“空白”空间也会被保存起来,备份文件比较大

备份

备份硬盘sda,放到/backup(/backup挂载在其他硬盘如sdb)

1、最简单的,无压缩:

以下是引用片段:

dd if=/dev/sda of=/backup/sda.dd

2、用gzip压缩

以下是引用片段:

dd if=/dev/sda |gzip -c# >/backup/sda.dd.gz

其中#用数字1-9代替,分别代表最快-最小 3、用bzip2压缩

以下是引用片段:

dd if=/dev/sda |bzip2 -c# >/backup/sda.dd.bz2

其中#用数字1-9代替,分别代表最快-最小

如果要看进度可以给dd发送信号SIGUSR1:

以下是引用片段:

killall -s SIGUSR1 dd

还原

还原的目的盘必须和原来大小一样,不然后果很严重……

1、无压缩

dd if=/backup/sda.dd of=/dev/sda

2、gzip

gzip -dc /backup/sda.dd.gz |dd of=/dev/sda

3、bzip

bzip2 -dc /backup/sda.dd.bz2 |dd of=/dev/sda

ghost

ghost是运行在dos下的,推荐使用 无为DOS工具箱,一个类似win下dos工具箱的东东,在linux下使用。

1.包含了ghost,可以备份ext3分区

2.使用msdos7.1 3.加入关机、重启功能

linux更新终止怎么办?

linux更新终止处理方法如下,

1.rpm安装,更新与卸载 RPM包,这种软件包就像windows的EXE安装文件一样,各种文件已经编译好,并打了包,哪个文件该放到哪个文件夹。

2.以.bin结尾的安装包 bin类似rpm包安装,也比较简单 bin安装 。

3.tar.gz(bz或bz2等)结尾的源代码包 这种软件包里面都是源程序。

4.yum安装 yum是rpm的管理工具,管理一个软件库,可以很好的解决依赖关系。 

linux系统装好后怎么更新源?

Linux软件源的设置方法

1 打开数据源配置文件

vi /etc/apt/sources.list

添加相关的数据源,可以选择以下的数据源,不要写太多,否则会影响更新速度。

之后使用apt-get update更新源列表

为防止非官方源中软件包不全的问题,请在sources.list文件中尾部添加一组官方源。

#######################################

# 163

#######################################

deb http://mirrors.163.com/debian/ lenny main contrib non-free

deb-src http://mirrors.163.com/debian lenny main contrib non-free

deb http://mirrors.163.com/debian-security/ stable/updates main

deb-src http://mirrors.163.com/debian-security/ stable/updates main

#######################################

# official

#######################################

deb http://ftp.debian.org/debian/ lenny main contrib non-free

deb-src http://ftp.debian.org/debian/ lenny main contrib non-free

deb http://ftp.us.debian.org/debian/ lenny main contrib non-free

deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free

deb http://security.debian.org/ stable/updates main

deb-src http://security.debian.org/ stable/updates main

deb http://volatile.debian.org/debian-volatile stable/volatile main

deb-src http://volatile.debian.org/debian-volatile stable/volatile main

#######################################

# 台湾及大陆教育网高校等

#######################################

deb http://ftp.tw.debian.org/debian/ lenny main contrib non-free

deb-src http://ftp.tw.debian.org/debian lenny main contrib non-free

deb http://mirrors.geekbone.org/debian/ lenny main contrib non-free

deb-src http://mirrors.geekbone.org/debian/ lenny main contrib non-free

deb http://mirror.dlut.edu.cn/debian/ lenny main contrib non-free

deb-src http://mirror.dlut.edu.cn/debian/ lenny main contrib non-free

deb http://debian.csie.ntu.edu.tw/debian/ lenny main contrib non-free

deb-src http://debian.csie.ntu.edu.tw/debian/ lenny main contrib non-free

### ustc debian-multimedia

deb http://debian.ustc.edu.cn/debian-multimedia/ stable main

deb-src http://debian.ustc.edu.cn/debian-multimedia/ stable main

### ustc debian-security

deb http://debian.ustc.edu.cn/debian-security/ stable/updates main non-free contrib

deb-src http://debian.ustc.edu.cn/debian-security/ stable/updates main non-free contrib

台湾及大陆教育网高校等

#######################################

deb http://ftp.tw.debian.org/debian/ lenny main contrib non-free

deb-src http://ftp.tw.debian.org/debian lenny main contrib non-free

deb http://mirrors.geekbone.org/debian/ lenny main contrib non-free

deb-src http://mirrors.geekbone.org/debian/ lenny main contrib non-free

deb http://mirror.dlut.edu.cn/debian/ lenny main contrib non-free

deb-src http://mirror.dlut.edu.cn/debian/ lenny main contrib non-free

deb http://debian.csie.ntu.edu.tw/debian/ lenny main contrib non-free

deb-src http://debian.csie.ntu.edu.tw/debian/ lenny main contrib non-free

### ustc debian-multimedia

deb http://debian.ustc.edu.cn/debian-multimedia/ stable main

deb-src http://debian.ustc.edu.cn/debian-multimedia/ stable main

### ustc debian-security

deb http://debian.ustc.edu.cn/debian-security/ stable/updates main non-free contrib

deb-src http://debian.ustc.edu.cn/debian-security/ stable/updates main non-free contrib

linux为什么无法更新系统?

1没有在网上下载最新的下载地址 下载完最新下载地址后用apt-get install update命令进行更新

linux中更新系统命令?

指令:yum。

yum命令用于redhat系统下的软件安装和更新,是redhat和Fedora系统中rpm的软件包管理器,使用前要配置好yum源,可以使用极为相似的centos源,而且免费。yum提供了安装,查找,删除软件包的命令,好记又好用。

安装。

yum install 全部安装。

yum install package1 安装指定的安装包package1。

更新。

yum update 全部更新。

版权说明:
本网站凡注明“公众IT 原创”的皆为本站原创文章,如需转载请注明出处!
本网转载皆注明出处,遵循行业规范,如发现作品内容版权或其它问题的,请与我们联系处理!
您可以扫描右侧微信二维码联系我们。
网站首页 关于我们 联系我们 合作联系 会员说明 新闻投稿 隐私协议 网站地图