Linux 为何对病毒免疫?
Gentoo下如何编译安装xetex-dev

我的Gentoo系统备份与还原方案

lyanry posted @ 2007年10月09日 07:49 in 我爱用Gentoo with tags gentoo 备份 , 8032 阅读

系统备份

这是我个人的习惯作法,未必适合其他人,写下来仅是供大家做个参考。

首先,我有个分区装了个后备系统。这样每当其他系统出了问题,我不至于没机子用。这个后备系统我平时很少用,更不会去瞎调;但我机子的 Grub是从这儿装的,备份或抢修其它分区也是在这儿做的。我这个后备系统用的是 Fedora 7,主要是因为使用 Fedora 7 的 live cd 安装系统比较容易,且占用空间小。

首先become root,准备备份装在 sda7 上的 gentoo 内核,以及 sda8 上的 gentoo 系统:

# mount /dev/sda7 /mnt/gentoo-boot
# mount /dev/sda8 /mnt/gentoo-sys

备份位于 sda7 上的 gentoo boot 分区:

# cd /mnt/gentoo-boot
# tar -czpivf /opt/gentoo-bak/gentoo-boot-sda7-xxxxxxxx.tar.gz *

备份位于 sda8 上的 gentoo 系统,将整个分区备份到 /opt/gentoo-bak 目录,但不包括/mnt/linux/usr/portage/distfiles下的东西:

# cd /mnt/gentoo-sys
# tar -cz --exclude=usr/portage/distfiles -pivf /opt/gentoo-bak/gentoo-sda8-xxxxxxxx.tar.gz *

系统还原

还原之前,最好将 sda7 与 sda8 格式化一下,如:

# mke2fs -j /dev/sda7
# mke2fs -j /dev/sda8

所谓还原,其实就是将备份包解开分别放置在原分区下:

# mount /dev/sda7 /mnt/gentoo-boot
# cd /mnt/gentoo_boot
# tar -zxvf /opt/gentoo-bak/gentoo-boot-sda7-xxxxxxxx.tar.gz

# mount /dev/sda8 /mnt/gentoo_sys
# cd /mnt/gentoo_sys
# tar xzvf /opt/gentoo-bak/gentoo-sda8-xxxxxxxx.tar.gz
Avatar_small
blogecho 说:
2007年10月12日 17:10 不好意思,我在这里:http://blogecho.cn/archives/101.html引用了你的文章,没有注明出处,实在抱歉。 事实上,我当时给自己的博客定位只是把它当作自己的网络记事本了,所以对于很多文章都是直接copy过来,没有考虑版权的问题,十分抱歉。我已经加上了出处。呵呵
Avatar_small
gentoo 说:
2008年6月12日 07:12

我的failsafe用的debian stable,不加X的话300M,加X和gparted之类的图形话工具800M,绝对比fc7小几倍。

Avatar_small
basketball legends 说:
2020年4月14日 12:47

I do not know what to say really what you share very well and useful to the community, I feel that it makes our community much more developed, thanks

Avatar_small
ch 说:
2021年6月03日 06:36

Somebody Sometimes with visits your website consistently and prescribed it as far as I can tell to peruse also. The method for composing is magnificent furthermore the substance is first class. A debt of gratitude is in order for that knowledge you give the perusers!  click here

Avatar_small
ch 说:
2021年6月04日 16:48

A debt of gratitude is in order for setting aside an ideal opportunity to examine this, I feel unequivocally about it and adoration adapting more on this point. In the event that conceivable, as you pick up aptitude, would you psyche upgrading your online journal with additional data? It is to a great degree supportive for me.  rent a car čačak

Avatar_small
chalsea 说:
2021年6月06日 23:43

Thanks for a wonderful share. Your article has proved  your hard work and experience you have got in this field. Brilliant .i love it reading. click here

Avatar_small
chalsea 说:
2021年6月07日 05:01

All influencers are provided a Social media scheduling, posting and unified communications platform that helps have all the conversations in one place and connected to a influencer bot Influencer synonym

Avatar_small
amelia 说:
2021年6月10日 20:09

counting sensible remarks here...  read more

Avatar_small
amelia 说:
2021年6月16日 04:42

A debt of gratitude is in order for sharing us.  sex doll online

Avatar_small
amelia 说:
2021年6月16日 04:42

That is truly decent to listen. much obliged to you for the upgrade and good fortunes.  packaging manufacturers

Avatar_small
amelia 说:
2021年6月17日 23:38

A debt of gratitude is in order for the decent blog. It was extremely helpful for me. I'm cheerful I discovered this site. Much obliged to you for offering to us,I too dependably discover some new information from your post.  cytocare s line

Avatar_small
amelia 说:
2021年6月22日 19:27

this is truly decent to read..informative post is great to read..thanks a considerable measure!  PON EDFA

Avatar_small
amelia 说:
2021年6月22日 19:28

I have been looking at a couple of your stories and i can state really well done. I will bookmark your online journal  canni

Avatar_small
ch 说:
2021年7月05日 19:02

I welcomed your work exceptionally thanks  Outdoor chair

Avatar_small
ch 说:
2021年7月05日 19:02

Truly an extraordinary expansion. I have perused this brilliant post. A debt of gratitude is in order for sharing data about it. I truly like that. Much obliged so parcel for your assemble.  car sunshade

Avatar_small
ch 说:
2021年7月13日 03:57

I might want to say this online journal truly persuaded me to do it! Much appreciated, great post.  mobile mechanic porter heights


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter