Scheduled backups
Running a backup yourself needs only the edition that the backup itself needs. Letting the scheduler run it unattended needs the Professional or Provider edition.
Server-wide and per-instance
Backups and restores can be scheduled in two places, and they interact in one specific way worth knowing.
- A server-wide schedule sweeps every instance.
- An instance can hold its own schedules, and several of the same type.
While an instance holds at least one schedule of a type, it is excluded from the server-wide sweep for that type and runs as its own single-instance jobs instead. Remove its last schedule of that type and it returns to the sweep.
The effect is that an instance is never backed up twice by two schedules that both think they own it. The effect you have to watch for is the opposite: giving an instance a narrow schedule silently removes it from the broad one.
Where to configure
| Schedule | Where | Default |
|---|---|---|
| Server-wide backups | Instance backups on the Maintenance page | On, every day at 20:30 UTC |
| Server-wide restores | Instance restores on the Maintenance page | On, every Sunday at 01:30 UTC |
| One instance's backups | The Schedule card on the instance's Backup tab | None: the instance follows the server-wide schedule |
| One instance's restores | The Schedule card on the instance's Restore tab | None: the instance follows the server-wide schedule |
Schedules are set in the console; the command line has no command for them. Times are UTC.
The mode is the master switch. A schedule, server-wide or the instance's own, backs up only the instances whose backup Mode is Automatic, and restores only those whose restore Mode is Automatic. Manual allows a backup or restore you start yourself and nothing on a schedule; Disabled refuses both. The Schedule card says when a schedule will not fire because of the mode, or because no storage provider is enabled.
Schedule nightly backups
A new instance starts with its backups Disabled and no storage provider, so no schedule backs it up. To have it backed up every night:
-
Give it somewhere to write. On the instance's Backup tab, add a provider and save; or, with Backup storage set up, pick an account under Managed storage and press Make and bind. Prefer a target off the server: a local backup does not survive the machine (see Targets).
-
Switch the mode to Automatic. On the same tab, set Mode to Automatic and save, or:
Remote or localagainstpelmo$ ohm instance backup-config set --instance fanes --mode Automatic -
Choose when. Leave the Schedule card as it is to follow the server-wide schedule, every day at 20:30 UTC unless it was changed on the Maintenance page. For another time, press Add a schedule, choose Daily and the Time (UTC), and Save; the instance then leaves the server-wide sweep, as Server-wide and per-instance says.
-
Run one now with Run now on the Schedule card, or:
Remote or localagainstpelmo$ ohm instance backup --instance fanes -
Check it worked: the job succeeds on the Jobs page, the archive is listed on the Backup tab, and the next morning the Schedule card shows the night's run as its last backup. Have a failure reach someone: see Being told how it went.
The instance's health check reports a production instance whose backups are off, and one backed up on a schedule that has not had a successful backup for longer than its schedule plus a day.
What a scheduled restore does
A scheduled restore, server-wide or the instance's own, restores over the instance itself from the enabled restore sources on its Restore tab - an Instance source first, then the storage providers - and applies the database options on that tab. Whatever the instance held is replaced each time. It is for a copy that should be refreshed from production on a schedule, such as a staging instance, and it runs only for instances whose restore Mode is Automatic.
An instance restored, cloned or imported with Test, Staging or Disaster recovery has its restore Mode set to Automatic, so the server-wide restore schedule - every Sunday at 01:30 UTC by default - restores over it from its restore sources. Work done on such a copy is lost at the next run. Set its restore Mode to Manual if the copy must keep what is done on it. Production sets it to Disabled.
What runs unattended, and what does not
The scheduler ticks every thirty seconds and does not catch up: a schedule whose moment passed while the API was down does not fire late. It runs at its next due time.
Housekeeping schedules that look after the server's own state are never license-restricted. Those keep running on any edition, including unregistered.
When the license carries less
Each schedule is disabled by its own job, and the Maintenance page and the instance's schedule card say the license switched it off.
What this means in practice: a subscription that ends switches your nightly backups off, and with the server running unregistered, backups by hand stop too. A License changed alert says so, but without alert delivery it reaches only the console's bell. The license expiry warning exists precisely because of this, and it is worth wiring the notification recipients up to somewhere a human reads.
While the license server merely cannot be reached, the schedules keep running. See When the license changes.