Restoring backups

Restore a backup onto its own server or as a new server, verify backups, let customers restore within limits, and give staff a backup role.

A backup can be put back onto its own server (restore in place) or used to make another server (restore to a new server). Administrators do both from Backups › Restore or from the server's Backups tab; resellers and customers from the server's Backups tab, within the switches and limits you set.

Restore in place#

The server gets its disks back as they were at the backup. It keeps its addresses, plan and size; everything written since the backup is lost.

  1. Open the server's Backups tab, or go to Backups › Restore and search the server by hostname or id, then pick a restore point.
  2. Press Restore on the backup.
  3. Type the server's hostname to confirm and press Restore.

What happens on the node:

  1. It downloads the backup next to the server's disks (after checking there is room) and checks every file against its SHA-256. An encrypted backup is decrypted on the way.
  2. It powers the server off and swaps the disks, keeping the old ones until the server has started on the restored ones. If the server's disk is now larger than in the backup, the restored disk is grown to the current size.
  3. It starts the server.

If the download or the check fails, the server is left on its own disks. A restore is refused while the server is suspended, in rescue or busy with another task. The server's tab shows "Restoring a backup" while it runs; when it fails, the reason is shown at the top of the tab.

Extra disks are restored onto the server's disks with the same ids. A backup on a directory on each node can only be restored on the node that took it.

Restore to a new server#

This makes a new server from a backup and leaves the backed-up server running untouched.

  1. On the server's Backups tab press Restore to new server on a completed backup, or on Backups › Restore press Restore to a new server on a restore point.
  2. On the page that opens, fill in:
    • The new server: its Hostname (default <hostname>-restored).
    • Where: the Location. Administrators can also choose a Node or leave it on Automatic. Only locations with a node that can read the backup's destination are offered; for a local destination, the backup's own node is the only choice.
    • Plan: only plans whose disk is at least the backup's disk are listed; the current server's plan is marked "(this server's)".
  3. Press Restore to new server.

The panel creates the server as any new server (limits, addresses, placement), then restores the backup onto it and starts it. The new server:

  • gets new addresses, never the backed-up server's;
  • starts with its own hostname, addresses, root password and SSH keys, set by its cloud-init seed at its first start. Its machine-id is reset as well (on nodes with virt-sysprep), so the two servers do not share it. For Windows, the Administrator password shown in the panel is set again after the restore;
  • gets disk 0 only from the backup; extra disks of its plan are created empty. The page says so when the backup has extra disks;
  • counts toward the owner's limits like any other server.

If the restore fails, the new server keeps running its freshly installed image and its page says why, with Try again; nothing is deleted automatically. Delete the server if you no longer want it.

Not supported: backups of servers installed from an ISO (the panel has no seed to give the copy its own identity), backups of deleted servers, and choosing another owner (move the server to another owner afterwards).

Backups of deleted servers#

When a server is deleted, its backups are kept for 7 days and listed on Backups › Restore under Deleted servers whose backups are kept, where Delete now removes them earlier. They cannot be restored from the panel yet (neither in place nor to a new server). After 7 days the hourly prune deletes them.

Verify a backup#

On Backups › Restore, Verify on a restore point has a node download the whole backup, check every file against its checksum (decrypting it when encrypted), check that each disk is a whole image, and delete the download. The server is not touched. The row then shows "Whole" or "Problems found" with the date. Verify costs a full download, which S3 providers may bill as egress. Verify is for administrators and is also in the API (POST /backups/{id}/verify).

For a PBS destination, PBS's own verify jobs are shown separately: press Snapshots on the destination's row under Backups › Destinations to see each snapshot's PBS verify state.

What customers and resellers may do#

Whoever manages a server (its owner, its reseller, administrators) sees its Backups tab, subject to these customer switches (group "Backups and snapshots"), set on the plan, the account or the server:

Switch Allows
See backups The Backups tab and its list; every other backup switch needs it
Take backups Back up now
Restore backups Restore in place
Restore backups to a new server Restore to new server, within the account's limits; on by default
Delete backups Deleting the server's backups

On the plan form (Customers › Hosting plans, the plan), Customer access to backups sets the first three in one step: None, See only, See and restore, or See, restore and take backups. Deleting stays a switch of its own. See Customer permissions for how plan, account and server switches combine.

Further rules for customers:

  • Restore to a new server also needs the account to be allowed to create servers (May create and delete servers on the account). Accounts created by the billing modules have this off by default, so for them the button does not appear.
  • Customers delete manual backups; scheduled backups are deleted only by administrators and resellers. A backup kept with Keep… cannot be deleted by a customer.
  • Customers do not see destinations or other servers' backups, and read plain words instead of the node's error codes.

Cooldowns#

Under Backups › Schedules › Customers' cooldowns you can limit how often customers act on each server: Between manual backups (minutes) and Between restores (minutes), 0 (no limit) by default. The tab then says when the customer can act again ("You can take another backup at …"); the API answers 409 cooldown with available_at and Retry-After. Administrators and resellers are never held to cooldowns.

A staff role for backup work#

Administrators with the built-in Administrator role can do everything above. To give a colleague only backup work, make a staff role:

  1. Go to System › Staff roles › Add role.

  2. Name it, for example "Backup operator".

  3. Tick the permissions it needs:

    Permission What it allows
    backups.view See the backup overview, history, destinations and schedules
    backups.manage Change destinations, schedules and pauses
    backups.restore Restore, verify and delete backups from the Restore page
    backups.panel The panel's own backups and their key
    servers.view See servers (needed to find them)
    servers.backups Back up, restore and delete a server's backups on its Backups tab; its backup policy
    servers.create Restore a backup to a new server
  4. Press Add role, then give the role to the staff account.

A role can only hold what the role of the person making it holds. See Staff roles.