Page 1 of 1
Backup software
Posted: Thu Apr 06, 2006 6:19 pm
by CptnObvious999
Hey I have gotten my Gentoo system exactly how I want it and it has been like this but I want to be able to back up my data onto my old 30GB Harddrive (Mine is 70GB but without my Videos and Music and src packages it should fit). I don't care if its commandline or GUI but I just need it to move everything with file permissions intact to my other harddrive except for files in the /usr/portage/distfiles directory and /home/devon/Music and /home/devon/Videos (I have my music on my iAudio so if my harddrive fails I loose it all and the Videos I can get back). I want to run it either at a scheduled time or so before I shutdown my computer I can run it and it will backup everything and shutdown automatically.
Any suggestions on the fastest or easiest to setup?
Posted: Thu Apr 06, 2006 7:06 pm
by Judland
I'd write a bash script, myself. In fact, that's how I backup my system right now. I wrote a bash script with some tar commands and I have cron run it in wee hours in the morning.
Works pretty well.
Posted: Thu Apr 06, 2006 7:59 pm
by snarkout
rsync -azv source dest is how I do it.
Check out the rsync man page -- it's very well written and very useful.
Posted: Fri Apr 07, 2006 8:06 am
by Gomer_X
Snarkout wrote:rsync -azv source dest is how I do it.
Check out the rsync man page -- it's very well written and very useful.
Same here. I've got a spare system with a 120 gig drive in it. Once a week I run a bash script with the rsync command in it.
I'd run it from a cron job except the system I backup to isn't on all the time.
Posted: Fri Apr 07, 2006 9:02 am
by Chess
I have seen other folks mention this bash backup script:
http://simplebashbu.sourceforge.net/
But I have not tried it.
Posted: Sat Apr 08, 2006 7:43 pm
by CptnObvious999
Thanks everyone for the suggestions. I tried simplebashbu but it didn't allow me to exclude directories (AFAIK). I also tried kdar and that did support excluding but it put everything in one file which is kinda annoying if I need to get to one file quickely or if I don't have kdar to restore it with so I just wrote a small rsync script like some of you did. (I have to mount my boot partition and my backup harddrive because I don't want them mounted by default for security reasons and obviously change it to meet your demands/directories) Here:
Code: Select all
#!/bin/bash
mount /dev/hdb1 /mnt/backup
mount /boot
nice -n 5 rsync -rlpEtgoDhPu / /mnt/backup --exclude-from=/home/devon/.backup_exclude
echo `date` >> /home/devon/.last_backup
umount /mnt/backup /boot
then my .last_backup file contains this:
Code: Select all
- /home/devon/Videos
- /home/devon/Music
- /home/devon/Podcasts
- /home/devon/.kde3.5/share/apps/amarok/themes/podcasts/data/
- /home/devon/.thumbnails
- /usr/portage/distfiles
- /proc
- /dev/pts
- /tmp
- /var/tmp
- /sys
- /mnt
- /media
now one last question how would I restore (hopefully I won't ever need to)? Can I just switch the root directory and the /mnt/backup directory on the rsync command?
Posted: Mon Apr 17, 2006 1:14 pm
by CptnObvious999
well it seems this whole backup idea was necessary. My harddrive crashed I think the other day. It says GRUB hard disk error when I boot from it. I have tried reinstalling grub and also reformating it and dumping the stuff from the backup onto it and it still doesn't work. Oh well, I was going to wait but I might as well buy a new harddrive now. I think I am going to get one of those nice 300GB harddrive so I won't have to ever worry about running out of space (at least for a long time or I get my hands on a bunch of DVDs to rip, legally of course

)
Posted: Mon Apr 17, 2006 1:40 pm
by snarkout
That's a lot of switches you've got there.