Backup & restore
One archive with everything your store is — and the way back when it matters.
A backup of your store has three parts: the database (orders, products, keys, customers), the file storage (the products your customers paid for) and .env (your secrets). Any part without the others is worthless — which is why scripts/backup.sh puts all three into one archive.
Take a backup
bash scripts/backup.shThe result lands as backups/vault-<date>.tar.gz with file mode 600. An empty database dump or missing files abort instead of writing a useless archive — a backup that silently protects nothing is worse than none.
Restore
bash scripts/restore.sh backups/vault-2026-08-09-120000.tar.gz- The script shows beforehand what will be replaced and requires the typed word
restore— holding Enter by accident is not enough. - Before overwriting, it saves the current state as
backups/before-restore-…— in case the restore itself was the mistake. - The database password of this machine is kept — so restoring also works on a freshly set-up server.