Backup and Restore: packages, Local/S3/SFTP/FTP destinations, UI and API

Encrypted packages (databases, PKI, client profiles) with safe restore and
a pre-restore safety copy, usable for server-to-server migration across
container and system-service installs. New Management page, ovp_backups
volume, migrations code in the profiler image, server name in package names.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ayurishchevandClaude Sonnet 5.5 committed 2026-10-07 09:38:09 +03:00
1 parent d29c261347
commit f8cdcd0fc6
55 files changed
+4401 -37

No files matched your search

+6 -1
View File
@@ -32,7 +32,12 @@ Variables of the scripts (environment of the shell, not `.env`): `OVPMON_BACKUP_
| `ovp_config` | `/etc/openvpn` | `server.conf` generated by the profiler | profiler |
| `ovp_pki` | `/app/easy-rsa` | easy-rsa scripts and `pki/` (CA, server and client keys and certificates, CRL, `ta.key`, `dh.pem`) | profiler |
| `ovp_client_config` | `/app/client-config` | generated client `.ovpn` files | profiler |
| `db_data` | `/app/db` | `ovpn_profiler.db`, `openvpn_monitor.db`, migration backups `*.db.bak-*` | gatherer, api, profiler |
| `db_data` | `/app/db` | `ovpn_profiler.db`, `openvpn_monitor.db`, `ovpmon_backup.db` (settings of the Backup and Restore page), migration backups `*.db.bak-*` | gatherer, api, profiler |
| `ovp_backups` | `/app/backups` | local backup packages of the Backup and Restore page (`OVPMON_BACKUP_LOCAL_ROOT=/app/backups`) | profiler |
`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.
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`.