View previous topic :: View next topic |
Author |
Message |
simon_chu n00b

Joined: 05 Sep 2003 Posts: 11
|
Posted: Thu Sep 18, 2003 4:01 pm Post subject: What to backup for a Gentoo laptop |
|
|
Dear all
I have a laptop dual booting WinXP (hda1) and Gentoo (hda5-7) and would like to perform a backup for the entire Gentoo system. The plan is like this:
- network mount to a server as /backup
- creat a tar file at that mount point and append the entire directory structure (/etc, /boot, /usr etc) with tar -zvrf one by one
- if the system crash, I can restore it by booting the LiveCD, recreate the partition, and do a tar -xzvpf just and edit the fstab, lilo etc.
My question is, apart from those 'file carrying' dir like /boot, /usr, /home etc. need to be backup, is/are there any dir (like /proc, /dev) that I should not backup for some reason?
Please also suggest if there is a better way of doing a directory structure backup (mine really sounds stupid) for system recovery.
Tks a lot!
Simon |
|
Back to top |
|
 |
bonsaikitten Apprentice

Joined: 01 Jan 2003 Posts: 213 Location: Shanghai, China
|
Posted: Thu Sep 18, 2003 7:52 pm Post subject: |
|
|
You won't need /proc and /dev.
tar should work fine (but be careful when using files >2GB ... I've seen some funny things happen ...)
A complete backup is the easiest thing to do, maybe you could split it in a "system" backup and a "home" backup that only includes /home/ ? |
|
Back to top |
|
 |
seltrus Tux's lil' helper

Joined: 24 Oct 2002 Posts: 102
|
Posted: Thu Sep 18, 2003 7:58 pm Post subject: |
|
|
hmm, seems like a lot of steps to me, but i think you have the right idea. i would recommend tarring up entire partitions to save time, but you should do it from a live cd to avoid copying worthless files. this is my standard procedure:
1. Boot from livecd
2. Make some easy to remember mount points (/mnt/source, /mnt/target, etc.)
3. Mount the correct partitions to the mount points and verify
4. cd /mnt/source; tar cfjpv /mnt/target/rootbackup.tar.bz2 .;
(the previous tar command is create, bz2 compression (better than bzip), preserve permissions (IMPORTANT) and verbose so you can see what is going on)
5. repeat above for /boot and /home partitions if necessary
6. when restoring, make sure preserve permissions is set as well
If you have some weird server that isnt supported through the live cd, dont fret. you can still create the tarballs on the source drive and then transfer it later (of course you need the free space)
tar cfjpv backup.tar.bz2 * |
|
Back to top |
|
 |
simon_chu n00b

Joined: 05 Sep 2003 Posts: 11
|
Posted: Sat Sep 20, 2003 5:10 pm Post subject: |
|
|
bonsaikitten, you're correct. I have trouble tar my /usr as the tar file (compressed) grows nearly 2G! and the tar stopped if not specified by j. Also one more thing troubled me was that whenever I added another subdirectory to the tar file, since the tar file needed to traverse the network to and fro which made the actual append delay.
Anyway, I've made backup tar files for my laptop (one for the /usr, one for the /dev, one for the /proc and one for the rest) but not have the gut to try restoring
I'll try with one of my PC (needs a clean install of Gentoo) and see if the same procedure works.
Tks for all of your advices.
Simon |
|
Back to top |
|
 |
|
|
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
|
|