Ticketz Sidekick is an auxiliary component for Ticketz administrative tasks. It works with both Open Source and PRO installations.
Available commands
backup: creates a backup of database and media files (publicandprivate)restore: restores the latest backup availableretrieve: extracts data from Whaticket SaaS-derived systems for migration
Installation
Sidekick is available for installations that were created with the auto installer and are up to date.
Backup
Run the commands from your installation folder (for example ticketz-docker-acme):
cd ~/ticketz-docker-acme
sudo docker compose run --rm sidekick backup
The process creates a .tar.gz file in the backups folder containing:
- database dump (
db_dump.sql) - backend media directories
Database-only backup
To back up only the database dump, use --dbonly:
sudo docker compose run --rm sidekick backup --dbonly
Backup retention
The RETENTION_FILES variable defines how many backup files are kept. The default value is 7.
Example in .env-backend:
RETENTION_FILES=14
Restore
Sidekick restores the most recent backup from the backups directory.
Restore with quick installer
With DNS and ports configured, place the backup file in the current folder and run:
curl -sSL get.ticke.tz | sudo bash -s hostname.example.com email@example.com
Manual restore
For projects such as ticketz-docker-local and ticketz-docker-cloudflare:
- Prepare the environment like a fresh installation and configure
.env-backendand.env-frontend. - Create a
backupsfolder in the project and place the backup.tar.gzfile inside. - Run restore:
sudo docker compose run --rm -T sidekick restore
- Start containers:
sudo docker compose up -d
Scheduling with cron
You can schedule daily backups with cron:
cat > /etc/cron.daily/backup-ticketz.sh <<EOF
#!/bin/bash
cd /home/ubuntu/ticketz-docker-acme
docker compose run --rm sidekick backup
EOF
chmod +x /etc/cron.daily/backup-ticketz.sh
Data migration with retrieve
To migrate data from another Whaticket SaaS-derived system:
- On the source server, download the tool:
git clone https://github.com/ticketz-oss/ticketz-sidekick
cd ticketz-sidekick
- Extract source database data:
./sidekick.sh retrieve dbHost dbName dbUser dbPass retrieve
This command creates retrieved_data.tar.gz in the target folder (default: retrieve).
- Also package the source backend
publicmedia folder:
cd /path/to/backend/public
tar -zcf ../public_data.tar.gz .
- Copy
retrieved_data.tar.gzandpublic_data.tar.gzto the new server and run quick installation:
curl -sSL get.ticke.tz | sudo bash -s hostname.example.com email@example.com
Important notes
- Installing Sidekick does not schedule backups automatically; administrators must configure this.
- Before restore, confirm DNS and open ports (
80and443) according to your installation method. - For manual restore, ensure database and media directories are ready to receive data.