Backups

Take a copy of everything, and know how to put it back.

Settings → Backup → Take a backup now. You get a zip containing the whole database as a .sql file, plus everything anybody has uploaded — logos, attachments, files sent in with a ticket.

The backup screen: take one now, the automatic schedule, and the backups kept on the server. The backup screen: take one now, the automatic schedule, and the backups kept on the server.

Press Take a backup now and leave the page open until it finishes — a large database can take a minute. It then says how many rows and files went in, and how large the zip is.

The backups on the server

Backups on this server lists each backup with when it was Taken, how it came to be (Automatic, By hand or Before update) and its Size.

Download it somewhere else. A backup sitting on the same server as the thing it is backing up protects you from a mistake, not from losing the server. Keep a copy off it.

The newest five are kept on the server and older ones are removed as new ones are taken, so the folder cannot fill the disk. They live outside the public folder and carry a deny rule of their own, so none is ever reachable by URL.

Without the uploads

Turn off Include uploaded files for a database-only copy. Much smaller and much quicker, and the right choice if your uploads are already backed up by your host.

Restoring

There is deliberately no restore button. Restoring drops live tables, and a web request that can do that is a web request somebody can be tricked into making. To restore:

StepWhat to do
1Unzip the backup.
2Put the uploads folder back at public/uploads.
3Import database.sql into an empty database — mysql -u USER -p DATABASE < database.sql, or phpMyAdmin's Import tab.
4Point your .env at that database.

On a SaaS install

Only the super admin can take one. A backup is the whole database, every workspace in it. On a single-company install that is exactly what you own; with SaaS mode on, it is everybody's data, so the screen is not there for a workspace's own administrator and the endpoints refuse them.

If the button is greyed out

The zip is built with PHP's zip extension. If your host has not enabled it, the page says so — ask them to turn it on. Backups themselves work on MySQL and MariaDB, which is what the installer requires anyway.

No mysqldump is needed. Most shared hosting disables the functions that would run it, so the dump is written by PHP through the same database connection the application already has.

Automatic backups

Settings → Backup now has an Automatic backups card above the list of backups. Switch on Take a backup automatically, choose How often (Every day or Every week), On (the weekday, for weekly backups), At (the time, as hours and minutes), Keep (how many automatic backups to keep, 1 to 100) and whether to Include uploaded files, then press Save schedule. It is off until you switch it on.

  1. Make sure the scheduler's cron entry is running (Settings → Scheduler shows the line to add). Automatic backups are taken by it.
  2. Switch the schedule on and save. The screen tells you when the first one is due — the first scheduled time after you saved, never straight away.
  3. After each run the card shows how the last automatic backup went: when, how large, and the file name — or, if it failed, the reason.

The time is the server's (the APP_TIMEZONE shown under the field). The check runs every five minutes, so a server whose cron was down catches up with one backup when it comes back rather than skipping the day. A failed backup is not retried every five minutes; it is shown on the screen and tried again at the next scheduled time. From the command line: php artisan zenta:backup:run takes one if it is due, and php artisan zenta:backup:run --force takes one now.

Which backups are removed. Automatic backups are only ever pruned against each other: when there are more than your Keep number, the oldest automatic ones are deleted. Backups you take by hand, and the one the updater takes before an update, are never removed by the schedule — the newest five of those are kept, as before. Each backup in the list is labelled Automatic, By hand or Before update.

In SaaS mode a backup is the whole database — every workspace — so the schedule belongs to the super admin alone: workspace administrators do not see the Backup screen at all.

Addresses on this page

For reference and for anyone scripting against the panel. Everything here needs somebody signed in to the workspace whose role allows it; anybody else is refused.

MethodAddressWhat it does
GETadmin/settings/backupThe backup screen. In SaaS mode the super admin only.
POSTadmin/settings/backupTake a backup now, with or without the uploaded files.
GETadmin/settings/backup/{name}Download: the backup zip, as a file.
DELETEadmin/settings/backup/{name}Deletes a backup from the server.
PUTadmin/settings/backup-scheduleSave schedule: the automatic backups.