Forum Moderators: phranque

Message Too Old, No Replies

Dedicated Linux Web Server BACKUP

         

eggerda

5:32 am on Nov 2, 2006 (gmt 0)

10+ Year Member



Hello,

I rent 2 dedicated linux web servers which host all of my websites.

I am looking for a way to back up the entire hard drive on each of these servers - and take an image of them and store it on my home PC - across the internet.

If the server were go up in flames, and the hosting company provides a fresh hard drive, the restore process should put the drive exactly as it was (configuration, websites, and all) when the last backup was taken...

Is this possible? (My home PC is an XP machine)

I appreciate any help you can give...

Dan

Frank_Rizzo

2:39 pm on Nov 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Disk Imaging
You could do something to create a 'ghost' type image. But would that be practical?

AFAIK full disk images (partitions etc.) can only be done offline - like from a boot disk. This would mean someone would physically have to be at the server, boot, create the image, restart.

Not only that but when it comes to restoring you would need the datacenter guys to a) know where you backup dvd is located, b) know how to reinstall the driveimage.

I thought of doing it that way but it's just not practical unless the server is with you.

Simple Tar / Gzip Backup
An easier, but not ideal solution, is to just use a standard incremental backup of the server by creating a tar.gz file. This file is generated everyday and you can download the data to any pc you wish.

I use two drives. One for the server, the other for temp files, log files and backups. If the main drive goes the webhosters reinstall the basic Linux image, I then restore my /home/ website dirs and any other software I have loaded.

This has happened to me twice now and it takes about an hour to get the server back to a working state after a disk has been replaced / Linux reinstalled.

I use a cron job to generate the backup file each day at 04:00. The file is generate and stored on the second disk. I also SCP the complete file to one of my other dedicated servers, and at 04:30 receive the backup of the other dedicated server.

vincevincevince

2:42 pm on Nov 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



pclinuxos is pretty good with packaging itself into a .iso file with pretty-much everything untouched - and in an emergency you can boot from it directly.

Not sure if it's web-server-class in the present state though. Don't see why it shouldn't be, if you can prune away the GUI, bells and buzzers.

Dainichi

7:05 am on Nov 8, 2006 (gmt 0)

10+ Year Member



You can install cygwin on your windows PC, run console and type:

#cd d:/backups (disk with a lot of free space)
#ssh your-host.com "sh -c tar cfz - / 2>/dev/null" > your-host.com.tar.gz

You can always unpack entry archive or some part of it. Read

#man tar

If you want to make daily updates of backup, you can use rsync (with ssh as a transport, it should be availble in cygwin environment)

[edited by: Dainichi at 7:14 am (utc) on Nov. 8, 2006]

percentages

7:21 am on Nov 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>I rent 2 dedicated linux web servers which host all of my websites.

I rent a few more, but, it doesn't much matter. This is not a job you should be concerned about, it is a job you should be passing on to your hosting provider!