How to backup your websites on Linux server with Webmin

As your websites grow, there is a time to look around for a dedicated or VPS server. Today’s Linux distributions are easy to manage and have many administration tools. If you do not want to pay for solutions like cPanel or Plesk, you can use ISPConfig together with Webmin for setting up a scheduled backup of your websites.

BackupHowTo.info runs on HostGator and I use the cPanel they offer for creating manual backups whenever I need. A few weeks ago I also choose a virtual server for some projects and use ISPConfig as an administration tool for creating websites and domains. However, its latest version doesn’t support backup tasks, so for the backing up I chose the Webmin.

I you worked with Webmin years ago, you may notice some nice improvements in its user interface, especially when using it on Debian. For some reason, the screenshots for this article were taken on CentOS and it seems the Webmin looks here different and no so nice.

What you need to backup?

So, there is a situation. You have some running websites on a Linux server. Creating MySQL backup is described in article How to Backup MySQL Database automatically (for Linux users). Today we will discuss website files backups. All your website files should be located in /var/www folder on Linux operating system. The are some subfolders depending on how much websites/domains you run. So we will backup all in /var/www to a tar file named with current date info.

How to backup websites using Webmin

Log in to your Webmin installation and click the System > Filesystem Backup. As a new directory select /var/www, check In TAR format and click the Add a new backup of directory button.

1. Setting up a website backup in Webmin

1. Setting up a website backup in Webmin

The new form will appear. Provide a filepath and filename where the backup will be created. I used /var/backups/%m%B_%d_%Y.tar to save the backup to the /var/backups folder and name the file with its date.

You can also expand the Backup options to set the backup label, enable the compression (gzip or bzip), set up symbolic links following if needed (only in very special cases) and fine tune other backup options.

2. Setting up a website backup in Webmin

2. Setting up a website backup in Webmin

Now expand the Backup schedule section. Check the Enabled, at times chosen below option. Continue with Simple schedule option and from the listbox select the Daily option.

3. Setting up a website backup in Webmin

3. Setting up a website backup in Webmin

Check all the settings and click the Create button to save the scheduled backup plan for your websites or use the Create and Backup now button to save the backup plan and immediately create the website backup.

As you can see, creating scheduled backup of your websites using Webmin is very easy. The backups will be saved every midnight to the files in /var/backups folder and named like 08August_15_2010.tar. Do not forget the /var/backup folder has to exist before you will run the backup via the Webmin.