Website backup script

back

A website can stop working for many reasons: a hosting failure, a careless action by an administrator, an unsuccessful module update, a hacker attack. Any of them can take the site offline, and restoring lost data and getting the resource back to normal then costs a lot of time and nerves — often at the worst possible moment.

To avoid such losses, PurpleLabs offers a simple solution — a script for creating website backups.

A backup is a copy of the databases, site files, mail, FTP accounts and everything else your website depends on. If for any reason the site breaks and data is lost, you can always take the saved version and restore everything.

What the script does:

  1. automatically copies site files and the database on a schedule;
  2. makes incremental backups: only changes are saved, so the archive does not take up extra space;
  3. stores copies outside the website server — on a separate disk, FTP or in the cloud;
  4. keeps a configurable history depth: daily, weekly and monthly restore points;
  5. sends an e-mail notification about every completed backup and every failure;
  6. checks archive integrity, so the copy is actually suitable for recovery;
  7. restores the whole site or a single file or table.

There is a simple rule worth remembering: a backup that has never been restored is not yet a backup. That is why during deployment we test restoring the site from the archive and show you how to do it yourself when needed. In an emergency nobody has to figure out from scratch where to start.

The script works both on ordinary shared hosting and on a dedicated server, does not load the site during peak hours and does not require constant attention from an administrator. It works with websites built on our CMS and on popular content management systems.

In practice the 3-2-1 rule works well: at least three copies of the data, on two different media, one of them outside the server where the site lives. A copy stored only on the same hosting disappears together with it — after a disk failure, an account suspension or a successful hack. The script supports this scheme out of the box and sends archives to the chosen destination by itself.

We choose the backup frequency based on how often the site changes. A business card site needs a weekly copy, an online store with orders needs a daily one, and the database even more often. Ask yourself one question: how much work can you lose without serious damage? The answer defines the interval between copies better than any universal schedule.

The script does not replace the backups made by your hosting provider — it complements them. A hosting copy is kept for a limited time, is sometimes available only through a support ticket and disappears together with the account when you move to another provider. Your own archive, which you access directly, does not depend on someone else's rules and deadlines.

Our backup script will save you from many problems related to bringing your site back online. Take advantage of it and make your life easier — and if you are not sure how often and where to store archives, we will be happy to advise.

Website backup system