PDA

View Full Version : backup question



gioto
23rd August 2007, 08:59 PM
I'm just back from an hard work of rescue and tweaking after an hardware disaster (HD mechanical crash).
I used until now partial backups and I had to work a lot to have my system back.
I don't want anymore to experience what happened me a few months ago.
I'm just using fwbackups.
My system is a triple boot w98 FC2 FC6 desktop, with home and data directories in separate partitions, shared by the two linux systems, connected in an home LAN with a dual boot laptop wME FC6.
All my hardware is quite old. I want to keep my old FC2 very well tweaked and really fast in my old hardware.
I think to continue to use fwbackups for partial backups, but I should like to have an incremental backup tool to backup the whole system to an external usb 200GB HD. I just read a lot in this forum and studied mondorescue, rdiff an bacula. In this moment I'm thinking a good option for me could be rdiff, it seems to me that should be possible to backup my windows partitions too.
I'm searching for the less complicate way to do the job.
I'm running linux since RH7.0 , so I'm not a newbye, but I have still a lot to learn.
Please give me your suggestions.
Thanks
Gio

rockyl
23rd August 2007, 09:11 PM
I have been using rsync to a USB drive and it seems to be adequate for my purposes. I have two PCs on a LAN, with the USB drive physically attached to one. I had to restore my wife's home directory a few months ago. I tried to install Ubuntu and it chewed up my LVM volume info. I restored the LVM stuff, but some of the data had been wiped out on the first volume.

Now I just need to set it up in cron to do the backups automatically. I've been doing them by hand every few days :)

sebnukem
23rd August 2007, 09:50 PM
I am running rsync daily from crontab to mirror my entire home directory to my file server (that itself has a RAID 1/mirroring setup). Rsync doesn't need a password because I've setup a RSA key pair (ssh-keygen) between my to systems with an empty passphrase. So my backup transfer takes about 2 seconds, when there's something new to backup.
I can't tell you if it's the best way to backup, but it works well enough for me.

gioto
23rd August 2007, 11:15 PM
Thanks for your replies.
I'm just doing quite the same with fwbackups, I'm backing up /home /etc /usr/local /opt /var /root and /boot but I was thinking about a full system backup to run occasionally and incremental backups of /home

rockyl wrote

I restored the LVM stuff, but some of the data had been wiped out on the first volume
BTW, where are the LVM info stored? What have I to backup should I need to restore the LVM stuff?
In this moment I'm only backing up my partition table and my mbr, I'm quite new to LVM.

rockyl
23rd August 2007, 11:48 PM
IIRC, the LVM info is like another partition table located at the beginning of the LVM partition. I suppose you could use 'dd' to save it off somewhere. Is that how you backup your MBR and partition table?

Firewing1
24th August 2007, 01:32 AM
I have been using rsync to a USB drive and it seems to be adequate for my purposes. [...] Now I just need to set it up in cron to do the backups automatically.
fwbackups does this for you if you'd like, and it can use rsync as an engine.

gioto, if you're looking for incremental backups, I would recommend rdiff. It's a nice program and similar to what fwbackups would be providing you (without the GUI though :( )
Firewing1

pete_1967
24th August 2007, 01:56 AM
For /home/ one way to backup stuff is with version control system (e.g. CVS or SVN, CVS requiring less space on your HD than SVN that stores copy locally but is weaker than SVN with binary files). Create a new repository on server called 'home' or if you want to separate users, repository with each user's name.

Rename user directory temporarily, checkout the skeleton repository, copy user's files back to the versioned /home/user, do recursive add and commit. After that, all you need to do is to run add + commit for the lot (e.g. daily) or every time you add/ modify individual file. You can easily create a script to do the job for you and add it to your cron.

Benefit is, you can go back in time for everything as far as you want to, or even have several revisions of each file at your disposal at any time.

rockyl
24th August 2007, 04:48 AM
fwbackups does this for you if you'd like, and it can use rsync as an engine.

gioto, if you're looking for incremental backups, I would recommend rdiff. It's a nice program and similar to what fwbackups would be providing you (without the GUI though :( )
Firewing1

One problem I have is getting the USB partitions to mount one boot. That's one reason I do the backups manually.

Any pointers on the correct way to mount them? They show up on the desktop (I'm using KDE), but I still have to click on them to get them mounted. There is a checkbox under Properties->Mounting for Mount Automatically, but it doesn't have any effect.

gioto
24th August 2007, 09:01 PM
Thanks to all for the help.

IIRC, the LVM info is like another partition table located at the beginning of the LVM partition. I suppose you could use 'dd' to save it off somewhere. Is that how you backup your MBR and partition table?
yes, I use
dd if=/dev/hda bs=512 count=1 > /home/gio3/rescue/MBR.bin
What's the way to backup and restore IIRC ?

gioto, if you're looking for incremental backups, I would recommend rdiff.
thanks, I'll take a try to rdiff, it seems to me to be lighter than mondorescue, and I think that bacula is for a more sofisticated network.
pete_1967
my /home is just a dedicated partition, shared between the different distros, so it's quite simple for me to backup, access and restore it in emergency too.

Firewing1
24th August 2007, 10:56 PM
One problem I have is getting the USB partitions to mount one boot. That's one reason I do the backups manually.

Any pointers on the correct way to mount them? They show up on the desktop (I'm using KDE), but I still have to click on them to get them mounted. There is a checkbox under Properties->Mounting for Mount Automatically, but it doesn't have any effect.
I guess this is a problem for both Gnome and KDE then - In Gnome I have the same problem where on logout the auto-mounted partitions will auto-*un*mount leaving a 'directory not found' for the backup... I caved and have a dedicated /media/Backups in /etc/fstab so it stays there. If you want adding 'user' to the options will let regular users mount the drive without the need of running "su -" first.
Firewing1

rockyl
28th August 2007, 11:55 PM
I guess this is a problem for both Gnome and KDE then - In Gnome I have the same problem where on logout the auto-mounted partitions will auto-*un*mount leaving a 'directory not found' for the backup... I caved and have a dedicated /media/Backups in /etc/fstab so it stays there. If you want adding 'user' to the options will let regular users mount the drive without the need of running "su -" first.
Firewing1

Check out this thread:

http://forums.fedoraforum.org/showthread.php?t=135961&page=2&pp=15

I did

modprobe -r ehci-hcd
modprobe ehci-hcd

and the USB partitions automounted. The drive also showed up as USB 2.0 (480 Mbps) instead of USB 1.1.