VPS backups: what to check before you sign

Almost every VPS offer says "backups included". Behind those two words there may be a nightly copy, stored off the machine and restored by experts, or a snapshot sitting on the same disk as the server. This guide gives the questions that make the difference, what each answer means, and how to check that a backup really restores.

Simon Vasconcelos Lee By Published on 5 November 20268 minute read

All guides

In short

  1. Ask what is backed up: the whole server, or only certain files? Is the database covered?
  2. Frequency sets what you can lose: a nightly backup means at most one day of work.
  3. Retention sets how far back you can go: it has to cover the time it takes you to notice a problem.
  4. A backup lives off the machine, encrypted. A disk mirror (RAID) or a snapshot on the same storage protects against something else.
  5. Ask who restores, how fast, and whether restores are included.
  6. Add a regular export of your database, kept on your side: that is the 3-2-1 rule.

The questions to ask

The questionWhy it mattersThe answer you want
What is backed up?A backup of hand-picked files misses whatever nobody thought to include.The whole server: OS, configuration, applications and data.
How often?Everything changed since the last backup is lost when something fails.Nightly at least, more often for a very busy database.
How long are backups kept?An error or an intrusion is sometimes noticed days later.Several restore points, over a period that covers the time to notice.
Where are they stored?A copy on the same machine disappears with it.Off the machine, on separate storage.
Are they encrypted?A backup holds all your data, passwords and keys included.Yes, before they leave the server.
Who restores?A backup you cannot restore quickly is no help on the day of the failure.Experts, on request.
Are restores included?A restore billed separately tends to surface at the worst moment.Yes, in writing in the offer.

Frequency and retention: what you can afford to lose

Two figures sum up a backup policy:

Retention answers a different question: how far back can you go? A deletion noticed the next day is fixed with the previous night’s backup. A quiet intrusion, silent corruption or a bug in an automated job may only surface later, and then you need a restore point from before the problem. For long-term archives, whether accounting or regulatory, a monthly export kept separately complements the server backup.

Where backups live, and who can delete them

A backup protects against what happens to the server. So it has to live somewhere else:

One point often overlooked: a backup that can be deleted from the server can also be deleted by an intruder who has taken over the server. Backups made and kept by the host, out of reach of the server being backed up, avoid that risk.

Databases need special care

A database writes all the time. A copy of its files taken while it runs captures it as it would be after a power cut: PostgreSQL and MySQL know how to recover from that state by replaying their log. For fine-grained restores, table by table or to another version, add a logical backup:

Terminal: daily export, PostgreSQL then MySQL
pg_dump -Fc -d my_db -f /backups/my_db-$(date +%F).dump
mysqldump --single-transaction --routines my_db | gzip > /backups/my_db-$(date +%F).sql.gz

Scheduled every night by a cron job, before the server backup runs, these exports end up inside it, and can also be copied to storage of your own.

The 3-2-1 rule

The rule cyber security agencies recommend fits in three numbers: 3 copies of your data, on 2 different media, with 1 off site. On a VPS it translates like this: live data on the server, the host’s backup off the machine, and a regular export of what matters most (the database, files uploaded by your users) to storage of your own.

Terminal: copy the exports to your own storage, with restic
restic -r sftp:user@storage.example.com:/backups init
restic -r sftp:user@storage.example.com:/backups backup /backups

Testing a restore

A backup is proven by restoring it. Once a quarter, and after every significant change to the server:

  1. Request or run the restore onto a test server, alongside production.
  2. Check that the application starts and responds.
  3. Compare a few figures with production: row counts in the main tables, date of the latest record.
  4. Note how long it took: that is your real recovery time.

On a managed VPS, these backups, keeping them off the machine and the restore itself are the host’s job: you ask, and the host restores.

If the server holds personal data, write the test down. In the European Union, the GDPR (Article 32) requires the ability to restore the availability of and access to personal data in a timely manner after an incident, and regular testing of the measures in place. A dated restore test is the simplest proof.

Backups made, kept and restored for you

With a Simafri Managed VPS, your server is backed up every night, encrypted and stored off the machine, and restores are included, carried out by our team. Our experts run the server for you: updates, 24/7 monitoring with intervention before you even call, a dedicated contact and committed response times.

Explore Managed VPS

Frequently asked questions

Is RAID a backup?

No. A disk mirror protects against a hardware failure, but it instantly copies a deletion, corruption or malicious encryption to the second disk. A backup is a separate copy, kept off the server, that you can go back to.

Is a snapshot a backup?

A snapshot on the same storage as the server lets you roll back quickly, after a failed update for example. It disappears with the storage it sits on: it complements a backup stored off the machine without replacing it.

How often should a VPS be backed up?

Every night for the whole server, which limits the loss to one day at most. A database that records transactions all day benefits from adding continuous archiving of its log, which lets you go back to the minute.

Who is responsible for VPS backups?

It depends on the offer. On an unmanaged VPS, you are, unless the offer includes a backup. On a managed VPS, the host takes the backups and restores them. Either way, read what the offer says about frequency, retention, storage location and restores.

Contact us