backups: daily backup, Back up now, download, restore.sh
A backup is data/backups/selfphoneng-YYYYMMDD-HHMM.tar.gz (mode 0600): pg_dump, voicemail, custom sounds, music on hold, recordings if asked, and a manifest. No generated Asterisk config: it holds plaintext passwords and comes back from the database. The api makes one a day after backup.time (once-a-minute check, one try a day) and the dashboard warns when today's is missing. Settings -> Backups sets the schedule, lists them for download and has Back up now. scripts/restore.sh <file> refuses a backup made under another APP_SECRET (the manifest carries a fingerprint, not the secret), asks for yes, then replaces the database and the folders the backup has. Tested on two throwaway servers (docker:dind running the real images): back up on one, restore on the other. That found the api image crashing on start since M1: tsc doesn't copy auth/common-passwords.txt into dist. The Dockerfile copies it now and CI loads the app inside the image. Task: M11-T3
This commit is contained in:
1 parent
803859a1d2
commit
164a5f0990
16 files changed
+738
-10
No files matched your search
@@ -37,4 +37,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- run: docker build -f apps/api/Dockerfile -t selfphoneng-api:ci .
|
||||
# Loads every module the way the container does: catches files tsc doesn't copy into dist.
|
||||
- run: docker run --rm --entrypoint node selfphoneng-api:ci --input-type=module -e "await import('/app/dist/app.js')"
|
||||
- run: docker build -t selfphoneng-asterisk:ci asterisk
|
||||
Reference in new issue
Block a user