skip to content

Managed Web Service Help & Support


Snapshots are records of the filesystem (including a mysqldump of the MySQL database) taken at specific times. The system takes daily snapshots (also referred to as backups) automatically and you can create up to two snapshots yourself.

mws cp backups

Where to find snapshots and backups

Details of your snapshots and nightly backups are available in the server settings control panel under 'Backups'.

They are stored within the /snapshots directory on your server. The /snapshots directory will contain up to 30 daily backups (snapshots made automatically by the system), together with any snapshots you have made yourself.

The daily backups will be in directories with names of the form  mws-snapshot-[date], where the date will be of the format yyyy-mm-dd. 

Within each of these directories will be subdirectories that match the ones in /replicated:

-rw-r--r-- 1 root  root         822 May  4   03:35 README.MWS3
drwx-wx--T 2 root  crontab     4096 May  4   03:35 crontabs
drwxr-xr-x 3 root  root        4096 May  4   03:35 etc
drwxr-xr-x 5 root  root        4096 May  4   10:22 home
drwx------ 2 root  root       16384 May  4   03:27 lost+found
drwx------ 4 mysql mysql       4096 May 11  12:00 mysql
drwxr-x--- 2 root  site-admin  4096 May 13  03:06 mysqldumps
drwxr-xr-x 5 root  root       4096 May  4   03:35 spool
drwxr-xr-x 5 root  root        4096 May 11  14:08 www


How to create and delete snapshots

A snapshot makes a record of the current contents of your filesystem and a backup of the database.

It is useful to make a snapshot of your server once your websites are stable, so you will have a record of them in case any future changes cause problems.

We recommend creating a snapshot of your server before you make a major change to the contents of your server (e.g doing an upgrade to one of your websites). Once you are sure that the major change has been successful it is best to delete the snapshot, because as time passes it will take up more and more of the pool space allocated to your server. If you need to preserve the contents of a snapshot long tern, it is best to copy its files elsewhere and then delete the snapshot, as keeping a snapshot or a long time risks your server running out of space.

How to create a snapshot

  1. Go to the 'Backups' section of the server control panel.
    The page will list any existing snapshots you have made, and the date and time at which they were created. Two user-created snapshots can be stored, so if there are already two snapshots listed, you will need to delete one of them before you can create another.
  2. Enter a Name for your new snapshot in Snapshot name: field. The characters that can be used in the name are restricted to letters, numbers, underscores, and hyphens.
  3. Click the Create snapshot button.
    The new snapshot will be added to the list of snapshots using the name you have chosen, with the date and time at which it was created.

How to delete a snapshot

  1. Go to the 'Backups' section of the server control panel.
    The snapshot names will be displayed under List existing snapshots, together with the date and time they were created.
  2. Select the snapshot you wish to remove, and click on the Delete snapshot button.

How to restore individual files from a snapshot

If you need to restore a file from a nightly backup or snapshot, you can copy it from the corresponding place in the directory tree within the backup. For example, suppose you had deleted a file within your default website, e.g. /var/www/default/docroot/conf.php, you could search for the file within the backups in /snapshots using the ls command:

$ls -l /snapshots/*/www/default/docroot/conf.php

This would list all the occurrences of the file available within the snapshots, and give details of their size and datestamp. Once
you have identified the version of the file you need, you can copy it to /var/www/default/docroot/config.php.

How to restore the server to a snapshot/backup

Please note that this will restore your filesystem to a previous state.
It will change back ALL the websites, databases and Home Directories on your server.

To restore to one of your own snapshots:

  1. Click on the Restore snapshot button next to it.

To restore to one of the nightly backups:

  1. Use the Calender icon within the Choose date box to select the date of the backup you wish to roll back to.
    The dates for which backups are available are highlighted in bold on the Calendar display).
  2. Once the date you've selected is displayed within the box (its format will be yyyy-mm-dd), use Restore backup to start the restore process.