# Backups and snapshots

## The nightly backup

Your VPS Ultra is backed up **in full, every night**: the system, your applications, your files and your databases. Each backup is **encrypted**, stored **off the machine**, and kept for **seven days**. It runs from outside your server: nothing to install, nothing to configure, and your server keeps serving while it takes place.

## Restoring your server

You choose the night to restore among the seven: write to support with your server's name, the **night** you want and what happened, so that we can advise you on the right night.

Our team restores your entire server to its state on that night, with its addresses and its settings. Data written after that backup is not included: before the restore, copy what you want to keep from the day, a database export for example.

## The snapshot before an update

Before a delicate operation (an update of the system or the kernel, a new version of your database, a migration of your application), request a **snapshot** from support. It freezes your server at the moment of the request:

* it is **free of charge**;
* it is kept for **seven days at most**;
* it lets you roll back in a few minutes if the operation goes wrong.

The snapshot complements the nightly backup and does not replace it. Once your update is validated, let us know: we remove it.

## Your databases

The nightly backup copies your server as it is at that moment. For a very active database, add a **regular export**, which gives a consistent copy as of the minute of the export. For example, every night with `cron`:

```
30 2 * * * pg_dump -U postgres -Fc my_db > /var/backups/pg/my_db-$(date +\%a).dump
```

The file name changes with the day of the week: you keep seven exports, and the nightly backup takes them along with everything else. For MySQL or MariaDB, `mysqldump --single-transaction` fills the same role; on Windows Server, the scheduled backups of SQL Server.

## Frequently asked questions

### Are my backups included in the price?

Yes: the nightly backup, its seven days of retention and the snapshot before an update are included in every VPS Ultra.

### Can I get a copy of my backup?

Your data belongs to you and you can extract it at any time. When you leave the service, ask us for a copy of the latest backup before the end of your contract (see [Billing and renewal](/en/vps-ultra/facturation.md)).
