Backup and restore
A Squad backup is one file with everything your instance needs to start again somewhere else. It restores into any way of running Squad, which is also how you move an instance to another machine or from Docker to systemd.
The .tar.zst file has the database, uploads, search index and settings, and the passwords and keys Squad made on its first start.
Squad also backs up by itself before it starts a newer release on older data. That backup has the database, passwords and keys but not uploads, and Squad keeps the newest 3.
Take a backup
Заголовок раздела «Take a backup»docker exec fluxer fluxerd backup --out - > fluxer-$(date +%F).tar.zstWith the compose file, the command is docker compose exec -T fluxer fluxerd backup --out - > fluxer-$(date +%F).tar.zst.
podman exec fluxer fluxerd backup --out - > fluxer-$(date +%F).tar.zstrunuser -u fluxer -- /opt/fluxer/current/bin/fluxerd backupThis writes the backup into /var/lib/fluxer/backups and prints its path.
kubectl -n fluxer exec fluxer-0 -- fluxerd backup --out - > fluxer-$(date +%F).tar.zstA VolumeSnapshot of data-fluxer-0 also works, if your storage supports it.
rexctl backuprexctl keeps the latest 3 in the backups folder of the instance. rexctl backup keep changes how many, and rexctl backup location where.
Squad shows a maintenance page while it copies uploads and the search index, and stays up the rest of the time. When a backup is already running, a second one stops with “another backup or restore of this instance is running”.
Leave parts out of a backup
Заголовок раздела «Leave parts out of a backup»Pass --skip with the parts you don’t want in a backup, such as uploads that your object store already backs up. Repeat it, or list the parts with commas between them.
rexctl backup --skip uploadsrexctl backup --skip uploads,search --skip natsWithout rexctl, fluxerd backup --skip uploads,search does the same.
| Part | What the backup leaves out | Where you can leave it out |
|---|---|---|
database | The PostgreSQL database | Every way of running Squad |
uploads | The files people upload | Every way of running Squad |
search | The search index | Every way of running Squad |
valkey | Valkey’s data | Every way of running Squad |
nats | The message queue | Every way of running Squad |
certificates | The edge’s own certificate authority | One container or systemd, not the older layout with many containers |
rexctl backup --without-uploads is the same as --skip uploads. rexctl refuses a part that the way your instance runs doesn’t have, and lists the parts it does have.
rexctl backup list and rexctl backup verify show what each backup leaves out. When rexctl deletes older backups, it keeps the newest backup that has each part. rexctl rollback only uses backups with every part, and upgrades and rexctl migrate always make full backups.
A restore keeps what the instance has for each part a backup leaves out, and on a new machine those parts start empty. Before it changes anything, rexctl restore says which parts the backup lacks. A backup without the database restores only the other parts. The database stays as it is, or starts empty on a new machine. After you restore a backup without search data on a new machine, run rexctl search reindex.
Back up on a schedule
Заголовок раздела «Back up on a schedule»Set these and Squad backs itself up into the backups folder of its data folder.
FLUXER_BACKUP_SCHEDULE=dailyFLUXER_BACKUP_KEEP=7FLUXER_BACKUP_HOUR=3| Setting | Helm value | What it does | Default |
|---|---|---|---|
FLUXER_BACKUP_SCHEDULE | backup.schedule | How often to back up, as daily, weekly or off | off |
FLUXER_BACKUP_HOUR | backup.hour | The hour it starts, from 0 to 23 | 3 |
FLUXER_BACKUP_KEEP | backup.keep | How many scheduled backups to keep before deleting the oldest | 7 |
The hour is in the machine’s time zone, which is UTC in the container image.
With rexctl, rexctl backup schedule daily sets up the schedule.
With rexctl on Linux, a systemd timer or cron job runs the backup at about 03:00. On Docker Desktop, rexctl sets FLUXER_BACKUP_SCHEDULE and Squad backs itself up.
Copy backups off the machine
Заголовок раздела «Copy backups off the machine»A backup on the same disk doesn’t help when the disk fails. Copy each backup somewhere else, such as another machine, a NAS or object storage.
rsync -a /var/lib/docker/volumes/fluxer-data/_data/backups/ backup@storage.example.org:/srv/fluxer/rclone copy fluxer-2026-12-01.tar.zst remote:fluxer-backupsThe first line copies the scheduled backups out of the Docker volume. Under systemd they are in /var/lib/fluxer/backups, which only the fluxer account can read, so run the copy as root or as the fluxer account.
A backup has every password and key of your instance, unencrypted. Encrypt each copy before it leaves the machine, for example with age, or with a tool that encrypts on its own, such as restic or an rclone crypt remote.
age -r age1examplepublickey... -o fluxer-2026-12-01.tar.zst.age fluxer-2026-12-01.tar.zstWith rexctl, this command takes your newest backup, from its own backups and the ones Squad makes by itself inside its container, encrypts it for your age public key and copies it over SSH. rexctl restore --age-identity key.txt restores the .age file.
rexctl backup copy-to --age-recipient age1examplepublickey... backup@storage.example.org:/srv/fluxerRestore
Заголовок раздела «Restore»A restore runs in one of two situations. Usually Squad is stopped and you run fluxerd restore on its data, as below. After you go back to an older release, Squad is running but not ready, because the data is newer than the code, and you run fluxerd restore inside the running container, pod or service to go back a version. In both cases the backup must come from the same release of Squad or an earlier release.
docker stop fluxerdocker run --rm -i --env-file fluxer.env -v fluxer-data:/var/lib/fluxer \ "$(docker inspect -f '{{.Config.Image}}' fluxer)" restore - < fluxer-2026-12-01.tar.zstdocker start fluxerThe restore runs on the same image as the container. With the compose file, stop it with docker compose stop, run docker compose run --rm -T fluxer restore - < fluxer-2026-12-01.tar.zst, then start it again with docker compose up -d.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
Stop the service with systemctl, because systemd starts the container again after podman stop. Use the tag from the Image line of the Quadlet file. As root, leave out --user and pass the EnvironmentFile path.
systemctl stop fluxerdrunuser -u fluxer -- /opt/fluxer/current/bin/fluxerd restore - < fluxer-2026-12-01.tar.zstsystemctl start fluxerdFollow the restore steps, which keep the chart version you run. After helm rollback, Squad stays up but not ready until you restore the backup in the running pod.
rexctl restorerexctl lists your backups, backs up the current instance first and puts the one you pick back. On a new machine, curl -fsSL https://www.squad-fun.su/source/ | sh -s -- restore fluxer-2026-12-01.tar.zst installs rexctl and restores in one step. For an instance on an IP address, then run rexctl config set domain with the new address.
A backup from the older layout, with Valkey and SeaweedFS, restores into one container or a systemd service as well. rexctl starts Valkey and SeaweedFS from the backup in short-lived containers, restores the database, moves the Valkey data into PostgreSQL and copies the uploads into plain files, with the same checks as rexctl migrate. It then removes those containers. If a step fails, rexctl puts the instance back as it was before the restore. Under systemd this needs Docker or Podman on the machine while the restore runs. rexctl restore --dry-run shows these steps without changing anything.
fluxerd restore --check checks a backup and whether it fits the instance, without changing anything or keeping a copy. In a container the file is on the machine, so pass it on standard input, with docker exec -i fluxer fluxerd restore --check - < fluxer-2026-12-01.tar.zst, docker compose exec -T fluxer fluxerd restore --check - < fluxer-2026-12-01.tar.zst with the compose file, or podman exec -i fluxer fluxerd restore --check - < fluxer-2026-12-01.tar.zst on Podman.
If the backup’s settings file differs from yours and Squad can’t write it, such as the fluxer.env you pass to Docker, the restore leaves yours alone and tells you the path where it saved the backup’s copy of the settings file.
What a backup leaves out
Заголовок раздела «What a backup leaves out»With your own PostgreSQL in FLUXER_POSTGRES_URL, a backup has no database, and with uploads in your own S3 store, it has no uploads. Back those up with your database’s and your store’s own tools, at the same time as Squad’s backup. With your own Meilisearch and FLUXER_MEILISEARCH_BUNDLED=false, a backup has no search index. Squad can build the index again from the database, so after a restore run rexctl search reindex, or choose “Reindex everything” under “Search Index” in the admin panel. The message queue, passwords and keys always stay on Squad’s volume and in its backups. Squad gets its public certificate again after a restore.
Test a restore
Заголовок раздела «Test a restore»Every few months, and after big changes, test the latest off-site copy on a spare machine.
-
On a spare machine or VM with Docker, download
fluxer.envas for a Docker install. SetFLUXER_DOMAINto your real domain,FLUXER_EDGE_MODE=proxyandFLUXER_LIVEKIT_ENABLED=false. Don’t point any DNS record at it. -
Copy the newest backup from where you keep copies, not from the instance itself.
If you encrypted it, decrypt it first. With age, that is this command.
Окно терминала age -d -i key.txt -o fluxer-2026-12-01.tar.zst fluxer-2026-12-01.tar.zst.age -
Restore it into a new volume with the
docker run --rm -i ... restore -line from the Docker tab above, with the same image tag as your instance runs. -
Start Squad on a Docker network without internet access. The copy has your SMTP server and push setup, so this keeps it from sending email or notifications to your users, and from asking Let’s Encrypt for a certificate.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
Wait until
docker exec fluxer fluxerd healthprintsready, then check the API with your domain in place ofchat.example.com. The command fails if the API isn’t working. To check your messages as well, sign in through an SSH tunnel to port 8080 at the container’s IP address, which is in$ip.Окно терминала curl -fsS -H "Host: chat.example.com" "http://$ip:8080/api/v1/_health" -
Delete the test machine and its volume, since they have every password and key. On a machine you keep, remove the container, the volume and the network with
docker stop fluxer,docker rm fluxer,docker volume rm fluxer-dataanddocker network rm fluxer-test.