- Web Server
- Control Panels
- Site Map/RSS Feeds
Backing Up And Restoring Your Dedicated Server With SystemImager
Up And Restoring Your Dedicated Server With SystemImager
This tutorial is based on the tutorial "Creating Images Of Your Linux System With SystemImager" (http://www.falkotimme.com/howtos/systemimager/index.php and http://www.howtoforge.com/howto_linux_systemimager) where you can find the basics about how to use SystemImager.
Now let's assume you have a dedicated Linux server (rented or co-location) that is located in some provider's data center which is normally a few hundred kilometers away from your office or home. Now you want to make an image of that system so that you have a back up in case your server crashes, you accidentally deleted all you customers' web sites, etc. (I'm sure you have enough fantasy to make up some horror scenarios for yourself here...). Creating such an image is no problem, even on a remote system that is in a data center, it is all described in the "Creating Images Of Your Linux System With SystemImager" tutorial.
But how do you restore such an image? That's the crucial point. The methods described in the "Creating Images Of Your Linux System With SystemImager" tutorial all require that you have physical access to your server and that your server has a floppy drive or a CD-ROM drive. But your server is a few hundred kilometers away, and nowadays only few servers have a floppy or CD-ROM drive.
There is a solution, the only requirement is that your dedicated server has some kind of Linux rescue system which is a feature that normallly comes with dedicated servers offered by one of the big hosting companies. It basically works like this: your hosting company gives you the login to some kind of control panel where you can see a lot of information about your server, e.g. traffic consumption in the last few months, documentation, passwords, billing information, etc. There will also be a page that lets you select the boot mode of your server, i.e. normal system boot or rescue system. If you select rescue system, the server will boot into the rescue system which you can use to repair your normal system. It is similar to your Linux machines in your office or at home where you use some kind of Linux live-CD (e.g. Knoppix) to repair your system.
Now in this tutorial I will demonstrate how to restore an image on your dedicated server on the basis of a dedicated server that the German hosting company Strato gave to me 3 months for free in order to write this howto. Many thanks to Strato for their co-operation!
If you have successfully
tried the methods described here on other hosters' dedicated servers please
let me know! I will mention it here.
This howto is meant as a practical guide; it does not cover the theoretical backgrounds. They are treated in a lot of other documents in the web.
This document comes without warranty of any kind!
1 Booting Your System Into the Rescue System
First login to your hosting companies control panel:
Then go to the page where you can select the boot mode of your server. Choose "Rescue System" here:
Tick the "Reset" checkbox. The system will be reset and boot into the rescue system. You will see the root password for the rescue system in the control panel.
2 Login To Your Rescue System And Restore Your Image
After a few minutes you can login to your rescue system via SSH. Login as root with the password that you got from the control panel.
As you can see from the image Strato is using a BusyBox rescue system which is very common on dedicated servers (btw, the SystemImager autoinstall diskette is also using BusyBox Linux). I have not tested yet, but the methods described here should work on any other Linux rescue system.
I have created a little shell script that automates the task of restoring the image back on your dedicated server. It connects to the image server and does all the things that the SystemImager autoinstall diskette would normally do (it has a little drawback though, the image name must not contain the string "beep"...). Now let's fetch the script and run it:
The script wants to know 3 details:
You should now see some activity that indicates that the image is being restored (e.g. the partitioning of your hard disk):
After the script has finished, go back to the control panel and choose "Normal Boot" as boot mode and reset the machine:
After a few minutes you will be able to login to your newly restored server!
3 Further Usage Of The Restore Script
Do you know this situation: you have found a hosting company where you want to rent a dedicated server, but now they tell you that they only offer Linux distribution xyz on their servers but you would like to have distribution abc, or you would like to use another version of xyz, or you do not like the default partitioning on the dedicated server. Normally you would have to look for another hosting company that offers exactly what you need, and most often there is no such hosting company, or at a higher price.
There is a solution: just install your perfect Linux system on a machine in your office or at home, make an image with SystemImager of it, and install that image on your dedicated server.
Creating Images Of Your Linux System With SystemImager: http://www.falkotimme.com/howtos/systemimager/index.php and http://www.howtoforge.com/howto_linux_systemimager