Forum Moderators: bakedjake

Message Too Old, No Replies

Effective Backup Strategy

         

Frank_Rizzo

11:41 am on Dec 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm a stickler for backups. With windows I have scripts which perform a 10 cycle backup each switch on and every 3 days a complete ghost image of the complete disk is done.

With Linux I'm not so efficient.

The Debian Linux server has two disks. Each night a backup script is run to syncronise files so that in the event of the main disk crashing, the second disk can be made the master and a new disk put in as the backup.

This works fine except that its no good when software goes wrong - all you will do is backup the corrupt software.

Is there a way of making images like the ghost image for windows? Heres the spec:

1) Two disks - deva, devc. deva is the main / live disk, devc the backup disk
2) Each night an image is created of deva and saved onto devc with the name image_27_12_2002 etc.
3) In the event of a software failure the main disk can be rolled back to any date by reimaging with the date required.

So how can images be made? Is it possible to just do a .tar.gz? or is a proper image software required so that rights, links, owners etc is preserved

Can the image be restored remotely? If I restore an image will the OS like being overwritten whilst running rather than booting from a floppy?

Cheers.

dingman

1:34 pm on Dec 28, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A tarball isn't propperly a 'disk image', but you can preserve file permissions and such in one. That's probably a better option than disk images anyway - images in my experience don't compress as well as you'd think they might. It would also be possible to create an image of a given partition with a command along the lines of

cat /dev/hda > /mnt/backupdisc/image.img

But you'd need enough space on the backup disc to hold all of /dev/hda including free space. You can save on some of that by modifying the command to pipe through compression software, something like

cat /dev/hda ¦ bzip2 > /mnt/backupdisc/image.img.bz2

However, my experience says that even with that the file image.img.bz2 will be larger than the total ammount of space actually used on /dev/hda.

With tar, do be careful about what you specify as files to back up. You probably don't want to copy /tmp, and almost certainly not /dev, and if you have the backup drive mounted you'll want to avoid including it in the backup as well.

Frank_Rizzo

10:21 am on Dec 30, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The disk space shouldnt be a problem. Both are 20Gb. Main one uses about 2Gb, the backup one is blank. I guess I could have a 7 day rotation on the backup one.

How to do the restore though?

Is it possible to completely restore the image via telnet or would the server have to be booted via a floppy or something?