For app publishers

Backups

Snapshots of the app’s data, and putting one back.

What this is

A backup is a copy of your app's data, taken at one moment: its database and the folders it keeps. If someone deletes the wrong thing or the data gets damaged, you can restore a backup. Restoring means putting the saved copy back in place of what is there now.

This is different from Deploys & logs. Restoring a version there puts earlier code back. A backup puts earlier data back.

Where to find it

  1. Open the Apps page and click your app.
  2. Click the card Build & deploy, then Backups.

Backups is in the Simple view. A few extra options (the schedule, keeping, downloading and deleting) are folded away. Click Show … advanced options at the bottom of the card, or switch to Advanced at the top of the app page.

What you see

Backups of the app’s data. A card that explains what is backed up. It lists the parts, for example "its PostgreSQL database" or "its persistent folders". It then shows:

  • Notices when something applies. See "When something looks wrong" below.
  • A status line. On shows when the backups run, how many are kept and when the next and the last one are. Off says nothing runs on a schedule. The last backup has a pill, for example ok or failed.
  • Back up now: takes a backup straight away.
  • Switch off or Switch on: turns the scheduled backups off or on for this app.
  • Schedule… (advanced): sets your own times.
  • A table of backups with the columns When, Holds, Size and Status.
  • A line at the bottom with how many backups can be restored.

In the table, under each date you see how the backup started: by hand, schedule or before a restore. A kept pill means the backup is pinned and will not be removed. off-site means a second copy is stored elsewhere. Holds says which parts are inside, and a small log link opens the notes of that backup. In Status you see ok, running, failed or pruned (an old one that was removed to make room).

Each row that can be restored has a Restore button. In the advanced options a row also has Keep (or Unpin), download links (for example ↓ postgres) and Delete.

Restores. Appears after your first restore. A table with When, From the backup of, Status and Details.

How to take a backup now

  1. Click Back up now.
  2. The button changes to Backing up….
  3. When it finishes, a green message says Backed up: with what was saved and its size. A new row appears at the top of the table with the status ok.

Do this before you do something risky, such as a big change to the app.

How to restore a backup

  1. In the table, find the backup from the time you want. Check the date in When and what it holds in Holds.
  2. Click Restore on its row.
  3. A window asks Restore the data of …? It tells you that the saved parts will replace what is there now, and that anything written since that backup is overwritten. The code, the values and the running version stay as they are, and the app keeps running. Click Restore this data.
  4. The button says Restoring…. When it is done, a green message says Restored. The data from just before is pinned as a backup of its own, in case this was the wrong one.

You know it worked when a row appears under Restores with the status ok.

Before every restore cyantula first takes a safety backup of the data as it is now and pins it. If you restored the wrong one, restore that safety backup the same way. The Details column of Restores says which one it is.

How to switch scheduled backups off or on

  1. Click Switch off (or Switch on when they are off).
  2. A message confirms: Scheduled backups are off. Back up now still works. or Scheduled backups are on.

How to change the schedule

Advanced. Show the advanced options first.

  1. Click Schedule….
  2. Under Schedule and retention, type when backups should run in the first box. It is a time pattern with five parts (minute, hour, day, month, weekday) in the time zone shown on the screen. At most four backups a day are allowed. Leave it empty to use the standard schedule of your cyantula, which is shown in the box.
  3. In the second box, type how many backups to keep. Leave it empty to use the standard number.
  4. Click Save. A message says Saved. The next backup follows the new schedule.
  5. Click Cancel to close the form without saving.

When your app has its own schedule, a line on the page says Has its own backup schedule.

How to pin, download or delete a backup

Advanced. Show the advanced options first.

  • Keep pins a backup, so the automatic clean-up never removes it. A message says Pinned — retention will never remove it. Click Unpin to undo it.
  • A download link such as ↓ postgres saves one part of the backup to your computer.
  • Delete removes the backup. A window asks Delete the backup of …? and says it is gone for good. Click Delete backup.

When something looks wrong

  • Scheduled backups are switched off on this server. Backing up and restoring by hand still works. Your administrator has turned the schedule off for everyone. Back up now still works. The Switch on button is greyed out.
  • This app has no database on cyantula and no persistent folder, so there is nothing to back up yet. The app stores its data somewhere else, or nowhere. Back up now is greyed out. See Storage.
  • A deploy is running — backups wait until it has settled. Wait for the deploy to finish.
  • The backup failed: followed by a reason. Try Back up now again later. If it fails again, send the reason to your administrator.
  • The restore failed: followed by a reason. Your data was not replaced. Try again, or ask your administrator.
  • No backups yet. Nothing has been saved. The table says when the first one runs, or tells you to click Back up now.
  • A row looks faded with the status pruned: that backup was removed to make room. It cannot be restored.
  • Redis is not included. If the card says so, a Redis cache is not backed up. An app should keep nothing important there.

Good to know

  • Only people who manage the app can back up and restore.
  • A restore overwrites the current data with the older copy. Anything written since is lost, except what is in the safety backup cyantula takes first.
  • Restore does not touch the app's code, values or running version.
  • Only the newest few backups are kept. The number is on the status line.
  • The dev address is not backed up. Its data is throwaway.
  • A backup or restore that takes longer than the time shown at the bottom of the card counts as failed.
  • Pinned backups, and the safety backup before a restore, are not removed by the automatic clean-up.