View previous topic :: View next topic |
Author |
Message |
Jerem Apprentice
Joined: 11 Jun 2004 Posts: 177
|
Posted: Mon Dec 20, 2004 1:02 pm Post subject: Easiest way to backup an entire gentoo system ? |
|
|
Well i have a Gentoo Linux system running on my /dev/hda and i also have a storage hard drive on /dev/sda. My question is :
running a knoppix, how can I backup my system, which is split amongst several partitions, as follows :
/dev/hda1 ==> DELL bios diagnostic stuff : critical thing : must be untouched
/dev/hda2 ==> Kro$oft's XP
/dev/hda3 ==> ext3 FS, mounted on /home
/dev/hda4 ==> the extended partition that stores following
/dev/hda5 ==> /boot ext2 FS
/dev/hda6 ==> swap (of course i dont want to backup this)
/dev/hda7 ==> my / with reiserFS
I have latest Gentoo and Knoppix livecd. |
|
Back to top |
|
|
zieloo Veteran
Joined: 28 Mar 2004 Posts: 1337
|
Posted: Mon Dec 20, 2004 4:46 pm Post subject: |
|
|
Do a tar(.gz) image? Many 'backupers' are available now... |
|
Back to top |
|
|
adsmith Veteran
Joined: 26 Sep 2004 Posts: 1386 Location: NC, USA
|
Posted: Mon Dec 20, 2004 5:13 pm Post subject: |
|
|
What is the purpose of the backup?
If you want one monolithic everything backup, then just do something like
Code: | tar cvpjf /my/other/drive/image.tar.bz2 / |
Be sure to use options to preserve fileowners and permissions (p). Obviosuly, --exclude the backup drive.
However, I think that's quite useless, really.
Why bother backing up all the system stuff, anyway? If something so catastophic happens that you blast all the system stuff, then just reinstall from scratch. Unless you expect a major disk failure TOMORROW, the system stuff will be out of date anyway. It would probably take more work to recover the saved data and make it boot properly than to just pop in the liveCD, install on a brand new drive, emerge sync/world, then restore the user data.
All that really needs to be saved is /etc (for future reference) and /home, along with any extra wierd config stuff you have, like in /usr/local. Maybe save your world list for rereference.
For this, do a similar command, replacing / with /home and /etc
Alternatively, do a daily/weekly sync of the directories using rsync, so that you always have a reasonably up-to-date copy of your user info. I think this is the best solution.
If you want to go old-school, there are the ancient unix tools like backup and restore which do some big goofy rotating incremental system. They are designed for tape drives, but can write to any device. |
|
Back to top |
|
|
John-Boy Guru
Joined: 23 Jun 2004 Posts: 442 Location: Desperately seeking moksha in all the wrong places
|
Posted: Mon Dec 20, 2004 5:36 pm Post subject: |
|
|
Dar |
|
Back to top |
|
|
Bob P Advocate
Joined: 20 Oct 2004 Posts: 3355 Location: Jackass! Development Labs
|
Posted: Mon Dec 20, 2004 6:34 pm Post subject: |
|
|
i'm going to take the complete opposite approach to adsmith, and say that rotating incremental backups are a good idea, especially for your /home folders where data files are stored. the only people who make fun of people who do backups are, obviously, people who have never suffered from lack of a good backup.
as far as backups of the system files go, i would not trivialize the need for a good system backup either. i guess if you're relying on a stage 3 installation with nothing that's been very customized, limiting your backup to /etc and planning on a reinstall is a viable option. OTOH, if you've done a Stage 1 installation and you've got a highly customized system, you're going to be SOL if your system files are lost. a full Stage 1 install of Gentoo, X, a bloaty Desktop Environment like Gnome or KDE, and tweaking all of your custom settings could probalby take a week of workdays. who has time for that?
in comparison, well-designed backups that run as cron jobs can happen silently in the background and nobody ever notices they're happening.
for me, choosing between the two options is a no-brainer. _________________ .
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks |
|
Back to top |
|
|
adsmith Veteran
Joined: 26 Sep 2004 Posts: 1386 Location: NC, USA
|
Posted: Mon Dec 20, 2004 6:40 pm Post subject: |
|
|
Actually, I thought I was strongly advocating incremental backups. I just think backing up /var /bin and so on is silly. Sorry if I wasn't clear. Backups are CRUCIAL.
A few friends and I, across the country, all rsync (via ssh) our $HOME's to each other's machine every night, as well as making local backups in our own home networks to spare drives. Even if two houses burn down, we still haven't lost anything really important. Sort of like a giant, slow RAID.
Some things, though, are easier to rebuild than to restore. I guess each person has to decide for himself where that tradeoff balances. |
|
Back to top |
|
|
Bob P Advocate
Joined: 20 Oct 2004 Posts: 3355 Location: Jackass! Development Labs
|
Posted: Mon Dec 20, 2004 7:07 pm Post subject: |
|
|
adsmith wrote: | Actually, I thought I was strongly advocating incremental backups. I just think backing up /var /bin and so on is silly. Sorry if I wasn't clear. Backups are CRUCIAL. |
sorry if i misintrepreted your post.
i don't think that backing up all of that other stuff is silly. i just spent a whopping $50 to buy a WD 120 GB drive at one of the office stores. the sole purpose for having that drive is to backup /var and /bin on multiple systems so that i don't have to recompile things unnecessarily. given the extremely low cost of media relative to the value of my time, i'd much prefer spending a few minutes to write a daily cron job, and let a backup that some may consider as overkill run during the wee hours of the morning.
the prospect of restoring by copying (executable) files from one disk to another seems alot more appealing to me than spend days recompiling an entire system. but that's just my personal preference. _________________ .
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks |
|
Back to top |
|
|
bin_streamer n00b
Joined: 24 Nov 2004 Posts: 37
|
Posted: Wed Dec 29, 2004 8:33 pm Post subject: |
|
|
Is there a way to tar backups of your system so that you can move it over multiple partitions? and then point to it with grub/lilo? _________________ Computers are like AirConditioners .... They Stop Working Properly as soon as windows opens |
|
Back to top |
|
|
John-Boy Guru
Joined: 23 Jun 2004 Posts: 442 Location: Desperately seeking moksha in all the wrong places
|
Posted: Wed Dec 29, 2004 10:20 pm Post subject: |
|
|
As I posted above - Dar, it's in Portage. I'm a fan |
|
Back to top |
|
|
Hauser l33t
Joined: 27 Dec 2003 Posts: 650 Location: 4-dimensional hyperplane
|
Posted: Thu Dec 30, 2004 6:20 am Post subject: |
|
|
This is how I backup the entire system:https://forums.gentoo.org/viewtopic.php?p=1563796#1563796 _________________ AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl
Do I like to compile everything?
Positive definite! |
|
Back to top |
|
|
gamezfreak n00b
Joined: 15 Dec 2003 Posts: 26
|
Posted: Thu Dec 30, 2004 10:25 pm Post subject: Help! |
|
|
Help!
I tried to create a backup tar using this command
tar -cvjpf --exclude=backup / /backup/backup.tar
and it created a file called '--exclude=backup' in /
now I can't delete it with rm, because --exclude=backup is an unrecognized option.
Any suggestions how to delete it? Also what should the proper command be to exclude the backup directory?
Thanks |
|
Back to top |
|
|
racoontje Veteran
Joined: 19 Jul 2004 Posts: 1290
|
Posted: Thu Dec 30, 2004 10:36 pm Post subject: |
|
|
dd if=/dev/sda | tar something |
|
Back to top |
|
|
Jake Veteran
Joined: 31 Jul 2003 Posts: 1132
|
Posted: Thu Dec 30, 2004 10:44 pm Post subject: Re: Help! |
|
|
gamezfreak wrote: | Help!
I tried to create a backup tar using this command
tar -cvjpf --exclude=backup / /backup/backup.tar
and it created a file called '--exclude=backup' in /
now I can't delete it with rm, because --exclude=backup is an unrecognized option.
Any suggestions how to delete it? Also what should the proper command be to exclude the backup directory?
Thanks |
Try Code: | rm -- '--exclude=backup' |
and Code: | tar --exclude=backup -cvjpf /backup/backup.tbz2 / |
Pay attention to the arguement order. You might need something more than just "backups", possibly "backup/*" or something like that. Also, gzip2 compression probably isn't worth using unless you have very little hard drive space or lots of CPU power |
|
Back to top |
|
|
gamezfreak n00b
Joined: 15 Dec 2003 Posts: 26
|
Posted: Thu Dec 30, 2004 11:24 pm Post subject: |
|
|
thanks jake, that worked |
|
Back to top |
|
|
|