Backups, snapshots, images
Nightly and manual backups, snapshots before risky changes, and your own images to create new servers from.
| Backup | Snapshot | Image | |
|---|---|---|---|
| What | copy of the server's disks, stored separately | point-in-time state on the same storage | the boot disk, as a template for new servers |
| When | nightly (if turned on) or on demand | on demand | from a shut-down server |
| Use it to | recover from loss or mistakes | roll back a risky change quickly | create many servers alike |
| Price | a percentage of the server's price | per GB of the server's disks per month (when priced) | per GB per month |
Backups and snapshots depend on the location; the console shows them where they are available.
Backups
- Nightly backups: turn on Backups on the server (Server → Backups), set
"backups": truewith the API (POST /serversorPATCH /servers/{id}) orbackups = truein Terraform. They start every night around 01:00 UTC (the console shows the time in your time zone, e.g. 02:00 or 03:00 in Slovenia); a second run at 04:30 UTC retries servers whose backup failed. - Backup now: up to 5 per day (
POST /servers/{id}/backups). - A number of recent backups is kept; older ones are removed automatically.
- Turning backups off keeps only the newest backup; the other backups of the server are deleted (the console asks first). Backups are billed while the option is on, from the minute you turn it on. Without the option you can keep one backup (Back up now when there is none).
- Restore (owners) overwrites the server's disks with the backup and starts the server
(
POST /servers/{id}/backups/{bid}/restorewithconfirm). Only the disks come back: size, addresses, private network and firewall settings stay as they are now. - A restore is not possible while the server has snapshots or detached disks.
- After a reinstall, backups from before it can no longer be restored to the server.
Snapshots
- Take one before an upgrade: Server → Snapshots or
POST /servers/{id}/snapshotswith an optionallabel. Up to 3 per server (default). - Roll back (owners,
POST /servers/{id}/snapshots/{sid}/rollbackwithconfirm) loses everything written after the snapshot and restarts the server. - While snapshots exist, disks cannot be added, grown or detached and the size cannot change. Delete snapshots when you no longer need them.
- A reinstall deletes the server's snapshots.
- Price: when the price list shows a snapshot price, each snapshot is billed per GB per month for the size of all the server's disks when it was taken (an upper bound: what a snapshot really takes grows as the disks change, and the platform cannot measure it). Billed by the hour until you delete it.
Images
- Server → Settings → Create image, or
POST /servers/{id}/imagewith aname; the server must be shut down and stays shut down. - The image contains the boot disk only, with everything on it, including users, passwords and keys. Extra disks and the server's firewall settings are not part of it.
- Images are private to your organization; up to 5 per organization (default). They are listed in
GET /imageswithown: trueand are used like any image ("image": "<id>"). - Delete with
DELETE /images/{id}; servers created from the image keep running.
Disks
- Add a disk (Server → Storage or
POST /servers/{id}/diskswithsize_gband an optional disktype); it is empty, format and mount it in the server (see the cloud-init example). Up to 4 disks per server, including the boot disk. - Grow a disk while the server runs (
PATCH /servers/{id}/disks/{did}with a largersize_gb); disks cannot shrink. Then grow the partition and file system in the server:
sudo growpart /dev/sda 1 && sudo resize2fs /dev/sda1 # e.g. the boot disk with ext4 on partition 1
sudo resize2fs /dev/sdb # an extra disk formatted without partitions