Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

19 lines
1012B

  1. @echo off
  2. rem SQLite backup and verification, run inside the "axonasp" container (the server keeps running).
  3. rem
  4. rem scripts\backup.cmd backup [file] consistent copy (VACUUM INTO) to db\backups\app-YYYYMMDD-HHMMSS.sqlite
  5. rem or [file], then integrity check and row-count comparison with the live db
  6. rem scripts\backup.cmd verify <file> integrity check, foreign keys, latest migration, row counts per table
  7. rem
  8. rem File names are relative to the repo root, for example db/backups/app-20261205-120000.sqlite.
  9. rem To restore, use scripts\restore.cmd <file>. The last line printed is "RESULT: ok" or "RESULT: failed".
  10. setlocal
  11. set CMD=%~1
  12. if "%CMD%"=="" set CMD=backup
  13. if /i "%CMD%"=="restore" (
  14. echo Use scripts\restore.cmd ^<file^>: it stops the server first.
  15. exit /b 1
  16. )
  17. docker exec -u axonasp -e SERVER_WEB_ROOT=/opt/axonasp/site -e "BACKUP_ACTION=%CMD%" -e "BACKUP_FILE=%~2" axonasp ./axonasp-cli -r /opt/axonasp/site/scripts/backup.asp
  18. exit /b %errorlevel%

Powered by TurnKey Linux.