Backups
A backup is everything that cannot be downloaded again: every database, Xema's settings, the phone system's configuration and the web server's. Call recordings are not included; copy them separately.
Backups are made on the server that holds the database. In a cluster of several servers, that is the one server that does; the admin pages say which.
From the admin pages
Open System → Backups.
Back up now
Back up now starts a backup on the database server and shows it running until it is done. It runs alongside calls; nothing stops while it does. Only one backup runs at a time.
A daily backup
Set the schedule beside it:
- On or off.
- The time, as a 24-hour
HH:mm. It is read in the time zone the page names beside it, which is the cluster's, and may not be yours. - How many to keep, from 1 to 365. After each backup that succeeds, the oldest beyond that number are deleted. A backup that fails deletes nothing, so a run of failures never removes the last good one.
Until a schedule is saved, nothing is backed up automatically, and the page says so.
The list
Every backup on the server, newest first, with when it was taken, its size and whether it is
complete. Download saves one to your computer as a single .tar.gz. An incomplete backup can
still be downloaded, and is marked as incomplete.
If the last backup failed, the page says so above the list, with the reason.
From the command line
The same backup, on the database server:
sudo xema backup
Each run is a folder under /var/backups/xema/, named for when it was taken, for example
/var/backups/xema/20261004-020000/. Inside it is a folder per kind of data: mariadb holds a dump
of every database, and xema, asterisk, nginx and systemd hold archives of their files.
Putting a backup back
Not from the admin pages yet. By hand, on the database server:
- each database:
sudo mysql < mariadb/<name>.sql— each dump creates and selects its own database - each file archive:
tar -xzf <archive> -C /