View previous topic :: View next topic |
Author |
Message |
occe Apprentice
Joined: 12 Feb 2003 Posts: 171 Location: Sweden
|
Posted: Tue Mar 11, 2003 5:06 pm Post subject: Hi.... would like to make a backup of my system. |
|
|
Hi
Would like to make a backup of my system, just if something happens, i.e all important stuff. How much space would it take? would it be possible to save the system onto a cdrom?
and can someone recommend a program to use?
thanks in advance /occe |
|
Back to top |
|
|
Ralphus Maximus Tux's lil' helper
Joined: 22 Jul 2002 Posts: 148 Location: At Large
|
Posted: Tue Mar 11, 2003 8:41 pm Post subject: |
|
|
Thre are a lot more elegant ways to back up, but this script works for me.
Code: | #!/bin/sh
NOW=`date +%F`
mount /boot
tar -cvf /mnt/share/backups/bootback.tar /boot
umount /boot
rar a -m5 /mnt/share/backups/mainback.rar /mnt/share/backups/bootback.tar
rm /mnt/share/backups/bootback.tar
tar -cvf /mnt/share/backups/etcback.tar /etc
rar a -m5 /home/backups/mainback.rar /mnt/share/backups/etcback.tar
rm -f /mnt/share/backups/etcback.tar
tar -cvf /mnt/share/backups/usrback.tar /usr
rar a -m5 /mnt/share/backups/mainback.rar /mnt/share/backups/usrback.tar
rm -f /mnt/share/backups/usrback.tar
tar -cvf /mnt/share/backups/binback.tar /bin
rar a -m5 /mnt/share/backups/mainback.rar /mnt/share/backups/binback.tar
rm -f /mnt/share/backups/binback.tar
tar -cvf /mnt/share/backups/optback.tar /opt
rar a -m5 /mnt/share/backups/mainback.rar /mnt/share/backups/optback.tar
rm -f /mnt/share/backups/optback.tar
tar -cvf /mnt/share/backups/varback.tar /var
rar a -m5 /mnt/share/backups/mainback.rar /mnt/share/backups/varback.tar
rm -f /mnt/share/backups/varback.tar
tar -cvf /mnt/share/backups/libback.tar /lib
rar a -m5 /mnt/share/backups/mainback.rar /mnt/share/backups/libback.tar
rm -f /mnt/share/backups/libback.tar
tar -cvf /mnt/share/backups/sbinback.tar /sbin
rar a -m5 /mnt/share/backups/mainback.rar /mnt/share/backups/sbinback.tar
rm -f /mnt/share/backups/sbinback.tar
cd /mnt/lshare/archives
mv /mnt/share/backups/mainback.rar /mnt/lshare/archives/mainback_$NOW.rar |
I use tar to copy the directory structure to a temp directory, and rar to compress the files. The system this script runs on does not have X installed, so the backup files are fairly small. If you have a large file and you want to span cd's, add:
to the final rar statement.
There were other backup scripts posted here that were a lot more involved and automatic. There is also a program that a lot of folks speak highly of Amanda, but I have not tried it.
I hope this helps.
Cheers,
RM _________________ Hero for hire. Dragons rescued, Virgins slain.
You say "Cheesy" like it's a bad thing!
In a society that is drug infested, violence-wracked and polluted by chemical greed, no one has ever died from an overdose of pornography. |
|
Back to top |
|
|
modal Apprentice
Joined: 02 Oct 2002 Posts: 277
|
Posted: Tue Mar 11, 2003 9:09 pm Post subject: |
|
|
i've heard good things about this mondo project (like ghost for linux)
http://www.microwerks.net/%7Ehugo/
haven't tried it yet, but a bootable cdrom, with your whole working system on it, sound good to me! |
|
Back to top |
|
|
occe Apprentice
Joined: 12 Feb 2003 Posts: 171 Location: Sweden
|
Posted: Tue Mar 11, 2003 11:14 pm Post subject: |
|
|
thanks for your tips, ill try that mondo-rescue out.
btw, my system is using reiserfs, do i need to check that for error occassionally or is it not necessary?
not so familiar with the filesystems in Linux, but its familiar to NTFS? and with that u dont need to defrag it like FAT. |
|
Back to top |
|
|
|