Skip to main content
FreeThree checks for your projectUptime, accessibility, SEO and cookie checks for your project
Menu

Backups and restore

Make a backup of an environment, list your backups and restore one.

On this page

A backup is a copy of one environment at one moment: its databases, its persistent files and its .tilizy/ configuration. Backups are encrypted and kept away from your server, in the backup storage that comes with your plan. This page shows how to make one, list them and restore one.

What is backed up, and when

  • Contents. One backup holds the database of every service you declared, every persistent folder from mounts, and the .tilizy/ folder of the release. It is stored as one archive with a checksum, which is verified before a restore.
  • Rhythm. Backups run every day unless you choose another rhythm.
  • Where. Each environment has its own backups. They count against the backup storage of your plan. See Storage and limits.
  • How many. Tilizy keeps a set number of backups per environment, usually 30, and removes the oldest when a new one arrives.

Your code is not part of a backup. It lives in your Git repository, and earlier releases are kept for rollback.

Make a backup now

Make a backup before a risky change, such as a large content import.

tilizy backup:create

The command queues a backup of the live environment. Add --staging or -e <branch> for another environment.

OptionWhat it does
--name <label>Adds a label to the name of the backup, so that you find it again.
--keep <number>Changes, for this run, how many backups are kept before the oldest is removed.

List backups

tilizy backup:list

The output lists the most recent backups of the project, up to 50. Add -e <branch>, --staging or --prod to see one environment only.

Restore a backup

Warning: A restore replaces the database of the environment with the one in the backup. Everything written since the backup is lost. Files from the backup are written over the files in your persistent folders. Files that are not in the backup stay where they are.
  1. Start the restore. Without further options, the command lists the backups that can be restored and lets you pick one:

    tilizy backup:restore
  2. Confirm. The command restores the backup into the environment it was taken from, starts the website again and follows the job to the end.

  3. Open the website and check it.

OptionWhat it does
--latestRestores the newest backup that can be restored.
--snapshot <name>Restores the backup with this name.
-e <branch>, --stagingRestores another environment instead of live.
--statusShows the restore of the environment and changes nothing. With --wait, it follows the restore until it ends.
-y, --yesSkips the confirmation, for scripts.

A restore that is already under way is continued, not started a second time: run the command again and it picks the restore up where it stands.

Other ways back

You want toUse
Undo a release that misbehavestilizy app:rollback. Add --db to restore the database snapshot taken before that deploy as well.
Put a set of files back into one persistent foldertilizy files:upload
Return to an earlier state of the database on your own computertilizy snapshot:restore. Local snapshots are quick checkpoints, not backups.

What can go wrong

  • The restore waits. Some restores need a step that cannot run on your server, for example when the backup first has to be fetched from backup storage. The command tells you where the restore stands. tilizy backup:restore --status shows it again later.
  • The backup is older than the code. A restore brings back data, not code. The running release may expect a newer database structure than the backup holds. Check the website after every restore.
  • Backup storage fills up. The portal shows how much backup storage each environment uses. You can add backup storage to any plan.

Next: Storage and limits and Database and files.