Backups

Full copies of a server's disk, stored away from the server, and how to restore them.

Backups are full copies of a server’s disk, stored away from the host it runs on. Take one whenever you want, for example before an upgrade or a big change, so you can go back if something goes wrong.

Take a backup#

On the server’s Backups tab, choose Back up now. You can give it a name, like “Before upgrading PHP”. The server keeps running while it’s taken. The backup is kept until you delete it.

You can’t take one while a snapshot is in place, or while the server is busy with another action.

Restore a backup#

Restoring replaces the server’s disk with the backup. Anything written since the backup is lost. To restore onto a server:

  • it must be in the same location as the backup
  • its disk must be at least as big as the backup’s
  • it can’t have a snapshot in place

Backups of destroyed servers#

When you destroy a server, its backups are kept. They stay on the workspace’s Backups page until you delete them.

From the API#

Backups need backups:read to list and backups:write to take, restore or delete one. To take a backup:

curl -X POST "$API/servers/$SERVER/backups" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"name": "Before upgrading PHP"}'

See the API reference for the rest.