I am new to Linux so I apologize if the questions are stupid.

I have a Debian lenny web server complete with MySQL, dovecot, Postfix Apache, PHP5, etc.

It runs on a server in a datacenter so I have no physical access to the server. If disaster strikes, the datacenter will install a fresh debian lenny with SSH root access, nothing more!

However I can do a "hard" reboot of the server since the data center have a special control panel that can do that.

  • How do I make a full backup?
  • How do I do incremental backups to minimize bandwidth use (I get charged for bandwidth use)?
  • How do I make a disaster recovery procedure so I can get all settings, packages, etc., from the backup?
  • There are a gazillion hosts out there .. I would look for one that if more helpful!
    – tomjedrz
    Nov 16, 2009 at 15:22

4 Answers 4


Given that you have no physical access to the server, nor any apparent means to specify how a restored server will be configured, I would be enlisting the assistance of the hosting company to determine how best to backup your server.

In the likely event that they are of no help, I would:

  • Run dpkg-get-selections >/var/backup/package_list each night, to get the list of packages on the machine
  • Dump MySQL or PgSQL databases
  • Use something like rdiff-backup to make a backup of /etc, /var, /home, and any other locations which are known to have user-modified data on them, to a remote location (excluding /var/spool, /var/tmp, /var/state, and the live location of any databases)
  • Restoration is a matter of copying the package_list back onto the machine, running dpkg-set-selections, apt-get dselect, then copying the backups back into place.

You can use backup2l for the backup side, which does a full and then incremental backups, which can then be transferred remotely using rsync.


I have the exact same setup - a dedicated server at a host that works great, but if disaster strikes I'm SOL because there is no backup. I could pay for a backup, but I'm on a budget and my data is not mission critical.

I have another Debian server locally that runs rsnapshot, a perl script that uses rsync to do incremental backups and hard links unchanged files to their original place. There's a tutorial here for how to set it all up. The most important data I have on the server are in my MySQL databases, so I back them up with rsnapshot and also run a script similar to the one in the tutorial that does a mysqldump of the databases and backs that up too, just in case.

As womble suggested, I also run dpkg-get-selections > /var/backup/debpkgs because if something does happen and the host reinstalls debian, I'll upload my /etc/apt/sources.list, reinstall the packages I need and then restore custom scripts, data and some config files (as opposed to trying to replace the server with a backup copy).


First of all, inquire if there is a backup service available (for an additional charge) at your ISP. If not, look into a cloud backup service and follow their recommendations.

You could set up Amanda to do what you want, but you'll need local storage and then you'll be answering all these questions yourself and configuring everything yourself.

For Disaster Recovery, look up "Bare Metal Restore". There are various approaches, such as restoring a boot disk image, re-installing the O/S and then installing the backup/restore tool, or using the backup vendor's boot recovery disk.

  • None of the bare-metal restorations will work, since the hosting company appears to provide a pre-made image and nothing else.
    – womble
    Nov 16, 2009 at 13:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .