# how to creat a backup of my tweaked gentoo system?

## re_re

i'm not sure if this is where this belongs, but its going here lol

anyway, i was wondering if anyone could explain to me how to back up my entire gentoo system to cd's or dvd and make it bootable so that.....when i trash my gentoo box.....and it will happen lol, i can reinstall my tweaked gentoo system instead of starting from scratch. 

would be nice to avoid all the compiling and reconfiguring of everything

any suggestions would be much appreciated

thanks

----------

## uman

1) Boot from a LiveCD

2) mount your drive at /mnt/gentoo

3) tar -cvvjp /mnt/gentoo/* -f /mnt/gentoo/backup.tar.bz2

4) Burn that file to a CD or DVD (If you don't know how search on google for cdrecord and mkisofs)

5) run md5sum /mnt/gentoo/backup.tar.bz2

6) run md5sum on the backup.tar.bz2 on the CD

7) Verify they are the same

To restore:

1) Boot from the LiveCD

2) Reformat your partition

3) Mount your newly-erased partition at /mnt/gentoo

4) Copy backup.tar.bz2 from the CD/DVD to /mnt/gentoo

5) cd /mnt/gentoo

6) tar -xvjpf backup.tar.bz2

Hope this helps, enjoy!

----------

## mahdi1234

u can store an image of either whole your drive or partitions u want ... use norton ghost or power quest drive image ... mebe something gpl available as well dunno ...

----------

## re_re

awesome, thanks a lot, big help

----------

## uman

No problem. By the way, if you want to be paranoid you could remove the -j flag in both the tar commands, this will make an insanely big file but it will be more resistant to, say, DVD or CD media getting scratched.

----------

## re_re

backed up my system with the aformentioned technique that uman posted and installed it on my other comp wihich is nearly identical to this one and it worked great.

just an update

----------

## asiobob

consider dar if you find your system changes often. It does differential backups and you can extract the catelog etc.. so you can make diff backups without giving it the entire first.

I use this to back up the /home partition on our server.

"dar" is a sourceforge hosted project

----------

## johabba

Two words:

mondo-rescue

Link:

http://www.microwerks.net/~hugo/

----------

## re_re

emerged mondo-rescue and mindi, haven't tried it yet, but looks pretty cool from the website

i'll post how well it works

----------

## mOjO_420

so... 

how well did it work?

----------

## re_re

i can't get it to run... it boots from the cd that i burned, but.... i can't backup my system...... i must admit though.... i haven't really put much time or effort in making it work

----------

## xxxx

http://www.partimage.org/ @

http://www.sysresccd.org/ and/or portage  :Laughing: 

imho...

----------

## jerome bettis

the first thing i'm doing when i finally get this system installed is running partimage to save a perfectly clean install.  then i'll probably do it again after i get it set up the way i like it.

partimage is pretty simple.  cd into the directory you want the image to be saved in first though otherwise you could run out of space.  then just select the partition you're backing up and type in a name for the image file.  burn it to a cd if you'd like.  later when you want to restore just fire it up again, pick the partition & image file and you're done.

----------

## mOjO_420

so in order to recover the partition i have to get a new system installed and setup (at least so far as being able to run partimage?)  maybe its included on knoppix or something?

that indeed sounds really easy though.. when restoring can i restore it on a larger partition than the original?  

should i shut up and read the docs...  :Wink: 

----------

## Dunska

Also check out: http://gentoo-wiki.com/HOWTO_Custom_Stage4

I use this method (basically a complete tar of the file system as mentioned previously) and it works well.

I modify the gentoo live cd to add this file and install from there.

The good thing about this is you can reinstall to different filesystem types if you want to change (e.g. move from ext3 to reiser4) - just be sure to update your fstab before rebooting  :Wink: 

----------

## jerome bettis

 *mOjO_420 wrote:*   

> so in order to recover the partition i have to get a new system installed and setup (at least so far as being able to run partimage?)  maybe its included on knoppix or something?
> 
> that indeed sounds really easy though.. when restoring can i restore it on a larger partition than the original?  

 

well i have 2 distros on the same hard drive, so if one gets messed up i'm ok.  it might be on the knoppix cd i don't know.  it is really easy and you can choose to use gzip / bzip / no compression on the image.  you can restore the old partition to a larger one, but you can't restore it to one that is smaller.  that kinda sucks but only makes sense.

----------

