Ce contenu n’est pas encore disponible dans votre langue.
Snapshots and Point-in-Time Recovery
ALTCHA Sentinel supports database snapshots and point-in-time recovery (PITR) for supported database backends.
Snapshots provide a portable backup format that can be used for backups, restores, and migrations between database backends.
Storage
By default, snapshots are stored on the local filesystem. For production deployments, we recommend configuring remote object storage such as AWS S3 or Azure Blob Storage.
For configuration details, see the Storage documentation.
Scheduled Snapshots
Automatic scheduled snapshots can be enabled using the following environment variables. Each variable accepts a standard CRON expression.
SNAPSHOTS_MAIN_SCHEDULE— Main database snapshotsSNAPSHOTS_REDIS_SCHEDULE— Built-in KV (Redis-compatible) store snapshots
Example (daily at midnight):
SNAPSHOTS_MAIN_SCHEDULE="0 0 * * *"Encryption at Rest
Snapshot encryption at rest is supported using age.
Generate an age key pair and configure the following environment variables:
SNAPSHOTS_AGE_PUBLIC_KEY=age1...SNAPSHOTS_AGE_SECRET_KEY=AGE-SECRET-KEY-...Restoring Snapshots
Snapshots can be restored either to the currently configured database or to a remote database specified by a connection string.
To restore a snapshot, navigate to Admin → Snapshots and select Restore from the snapshot menu.
Migrating Between Database Backends
Snapshots can also be used to migrate data between supported database backends. For example, you can migrate from PostgreSQL to MySQL by:
- Creating a snapshot from the source database.
- Restoring the snapshot to the target database using its connection string.
- Updating the Sentinel configuration to use the new database backend.
Disabling Snapshots
Snapshots can be disabled entirely by setting:
SNAPSHOTS_ENABLED=0Technical Notes
- Snapshots are stored in CSV format for maximum cross-backend compatibility.
- During snapshot creation, the main database is temporarily placed into read-only mode to ensure consistency.
- During snapshot restoration, Sentinel enters maintenance mode and temporarily blocks access until the operation completes.