Backups and updates
Update
sh
cd yoursms-gateway
git pull
cd infrastructure
docker compose up -d --buildThe database is brought up to date when the server starts. Phones keep working through an update: they store their results and pass them on when the server is back.
Backups
The deployment writes a compressed copy of the database to the backups volume once a day, and deletes copies older than 14 days. Change that with BACKUP_KEEP_DAYS in .env.
List them:
sh
docker compose exec backup ls -lh /backupsCopy one off the machine. A backup that lives only on the server it protects is not a backup:
sh
docker compose cp backup:/backups/yoursms-YYYYMMDD-HHMMSS.dump .Restore
This replaces the contents of the database with the copy.
sh
docker compose stop server
docker compose exec backup pg_restore -h db -U yoursms -d yoursms --clean --if-exists /backups/yoursms-YYYYMMDD-HHMMSS.dump
docker compose start serverPractise a restore before you depend on it.
What a backup does not contain
Your .env file. Keep a copy of it separately. Without YOURSMS_ENCRYPTION_KEY, the webhook signing secrets in a restored database cannot be read.
