Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Easiest way to backup an entire gentoo system ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Jerem
Apprentice
Apprentice


Joined: 11 Jun 2004
Posts: 177

PostPosted: Mon Dec 20, 2004 1:02 pm    Post subject: Easiest way to backup an entire gentoo system ? Reply with quote

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
View user's profile Send private message
zieloo
Veteran
Veteran


Joined: 28 Mar 2004
Posts: 1337

PostPosted: Mon Dec 20, 2004 4:46 pm    Post subject: Reply with quote

Do a tar(.gz) image? Many 'backupers' are available now...
Back to top
View user's profile Send private message
adsmith
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1386
Location: NC, USA

PostPosted: Mon Dec 20, 2004 5:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
John-Boy
Guru
Guru


Joined: 23 Jun 2004
Posts: 442
Location: Desperately seeking moksha in all the wrong places

PostPosted: Mon Dec 20, 2004 5:36 pm    Post subject: Reply with quote

Dar :)
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Mon Dec 20, 2004 6:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
adsmith
Veteran
Veteran


Joined: 26 Sep 2004
Posts: 1386
Location: NC, USA

PostPosted: Mon Dec 20, 2004 6:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Mon Dec 20, 2004 7:07 pm    Post subject: Reply with quote

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. :wink:

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
View user's profile Send private message
bin_streamer
n00b
n00b


Joined: 24 Nov 2004
Posts: 37

PostPosted: Wed Dec 29, 2004 8:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
John-Boy
Guru
Guru


Joined: 23 Jun 2004
Posts: 442
Location: Desperately seeking moksha in all the wrong places

PostPosted: Wed Dec 29, 2004 10:20 pm    Post subject: Reply with quote

As I posted above - Dar, it's in Portage. I'm a fan :)
Back to top
View user's profile Send private message
Hauser
l33t
l33t


Joined: 27 Dec 2003
Posts: 650
Location: 4-dimensional hyperplane

PostPosted: Thu Dec 30, 2004 6:20 am    Post subject: Reply with quote

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
View user's profile Send private message
gamezfreak
n00b
n00b


Joined: 15 Dec 2003
Posts: 26

PostPosted: Thu Dec 30, 2004 10:25 pm    Post subject: Help! Reply with quote

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
View user's profile Send private message
racoontje
Veteran
Veteran


Joined: 19 Jul 2004
Posts: 1290

PostPosted: Thu Dec 30, 2004 10:36 pm    Post subject: Reply with quote

dd if=/dev/sda | tar something
Back to top
View user's profile Send private message
Jake
Veteran
Veteran


Joined: 31 Jul 2003
Posts: 1132

PostPosted: Thu Dec 30, 2004 10:44 pm    Post subject: Re: Help! Reply with quote

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
View user's profile Send private message
gamezfreak
n00b
n00b


Joined: 15 Dec 2003
Posts: 26

PostPosted: Thu Dec 30, 2004 11:24 pm    Post subject: Reply with quote

thanks jake, that worked
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum