Deploy scripts: compose version check, ovpmon_backup.db in native backups

Docker: variant B needs Docker Compose 2.17+ (additional_contexts); install.sh
and update.sh check it in the preflight. Native: backup.sh, update.sh,
restore.sh and --rollback now copy and restore ovpmon_backup.db (Backup and
Restore settings) as an optional file. Verified install, update, backup,
restore and rollback on Debian 12 (systemd), Alpine 3.23 (OpenRC) and both
container variants.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ayurishchevandClaude Sonnet 5.5 committed 2026-10-07 12:58:42 +03:00
1 parent f8cdcd0fc6
commit 3fac8d70d8
11 files changed
+178 -7

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ Variables of the scripts (environment of the shell, not `.env`): `OVPMON_BACKUP_
`ovp_backups` is not one of the five data volumes: `deploy/docker/backup.sh` and `update.sh` do not copy it (packages are not put inside copies of the volumes). Back it up separately or use a remote destination. See [Backup and Restore](../../Profiler_Management/Backup_Restore.md).
Variant B, profiler image: besides `APP_PROFILER` it holds `/opt/core` (`migrations.py`, `migrate.py`, `db.py` of `APP_CORE`, standard library only; `OVPMON_CORE_DIR=/opt/core`), added at build time through the build context `core` (`additional_contexts` in `docker-compose.yml`, docker compose 2.17+). The restore of a backup package uses it to migrate the monitoring database of the package.
Variant B, profiler image: besides `APP_PROFILER` it holds `/opt/core` (`migrations.py`, `migrate.py`, `db.py` of `APP_CORE`, standard library only; `OVPMON_CORE_DIR=/opt/core`), added at build time through the build context `core` (`additional_contexts` in `docker-compose.yml`, docker compose 2.17+; `install.sh` and `update.sh` check the version before the build). The restore of a backup package uses it to migrate the monitoring database of the package.
Not stored in volumes (lost when the container is recreated): the container file system, `profiler.log` and `openvpn_gatherer.log` (written into the working directory), supervisor state. Application logs go to `docker logs`.