Skip to main content

Configuration reference

Sentinel reads a single YAML file, passed with --config. This page lists every key the parser recognises, grouped by the block it belongs to. Keys not listed here do not exist.

Loading happens in a fixed order: parse YAML → apply defaults → resolve named storages → resolve *_env overrides and secrets files → interpolate ${VAR} references. Validation runs afterwards. Anything that fails in that sequence fails at configuration-load time, never partway through a running backup.

n/a in the Default column means the field has no default: it is left at the Go zero value ("", 0, false, or an empty collection) and nothing downstream substitutes a value.

Top-level keys

KeyTypeRequiredDefaultDescription
versionstringYesn/aSchema version. Must be exactly 1.0; any other value is rejected.
defaultsmappingNon/aValues inherited by every backup job. See defaults.
databasesmappingYesn/aBackup job definitions keyed by job name. At least one job is required. See databases.
restoresmappingNon/aRestore job definitions keyed by job name. See restores.
restoremappingNon/aShared runtime settings for restore execution. See restore.
storagesmappingNon/aNamed, reusable storage definitions referenced by storage.name. See storage blocks.
max_concurrent_backupsintNo3Global backup concurrency limit. Must be between 1 and 100.
max_concurrent_restoresintNo1Concurrency limit for restore run --all. Must be between 1 and 100; parallelism is opt-in.
schedulermappingNon/aScheduler concurrency, timeout, and lock settings. See scheduler.
integritymappingNon/aRepository-wide integrity settings. See integrity.
log_formatstringNojsonLog output format: json or text.
history_db_pathstringNo~/.sentinel/history.dbPath to the SQLite execution-history database. Supports ${VAR} interpolation.
encryption_key_envstringNon/aName of the environment variable holding the base64 master key for artifact encryption. Encryption is enabled only when this or encryption_key_file is set.
encryption_key_filestringNon/aPath to a file containing the base64 master key. Supports ${VAR} interpolation.
secrets_key_envstringNon/aName of the environment variable holding the key that decrypts an encrypted secrets file. Falls back to encryption_key_env when unset.
secrets_key_filestringNon/aPath to a file containing the base64 secrets-file key. Falls back to encryption_key_file when unset.
Added in v1.4.0

secrets_key_env and secrets_key_file were introduced in Sentinel v1.4.0 alongside at-rest encryption of secrets files.

defaults

Every key here supplies a fallback for the matching key on a backup job. Inheritance is block-level: a job that declares its own retention block does not merge with defaults.retention, it replaces it.

KeyTypeRequiredDefaultDescription
schedulestringNon/a5-field cron expression applied to jobs with no schedule of their own.
storagemappingNon/aStorage backend applied to jobs that declare neither storage.type nor storage.name. See storage blocks.
retentionmappingNon/aRetention policy applied to jobs with no effective retention rule. See retention.
compressionmappingNon/aPipeline compression applied to jobs with no compression block. See compression.
notificationslistNon/aNotification channels applied to jobs with no notifications list. See notifications.

databases

Each entry under databases is a backup job; the map key is the job name. The name __integrity_check is reserved and rejected.

Job identity and connection

KeyTypeRequiredDefaultDescription
typestringYesn/aOne of postgres, mysql, mariadb, mongodb.
enabledboolNotrueWhether the scheduler runs this job.
hoststringConditionaln/aServer hostname. Required (or host_env) for postgres, mysql, mariadb. Not used by mongodb, which connects via uri. Supports ${VAR} interpolation.
host_envstringNon/aName of an environment variable holding the host. When set, its value overwrites host; the variable must be set at config-load time or loading fails.
portintNon/aServer port. For mysql/mariadb, filled from defaults_file when left unset.
usernamestringConditionaln/aLogin user. Required (or username_env) for postgres, mysql, mariadb. Supports ${VAR} interpolation.
username_envstringNon/aName of an environment variable holding the username. Overwrites username; the variable must be set at config-load time or loading fails.
password_envstringConditionaln/aName of an environment variable holding the password. Required for postgres, mysql, and mariadb unless a password is resolved from defaults_file. Passwords are never written inline.
defaults_filestringNon/aPath to a MySQL/MariaDB option file. Its [client] section seeds host, user, password, and port for both the dump subprocess and Sentinel's own preflight and discovery. Explicit fields always win. mysql/mariadb only: rejected on any other type.
defaults_file_envstringNon/aName of an environment variable holding the path for defaults_file. Overwrites defaults_file; the variable must be set at config-load time or loading fails.
uristringConditionaln/aMongoDB connection URI. Required (or uri_env) for mongodb. Supports ${VAR} interpolation.
uri_envstringNon/aName of an environment variable holding the MongoDB URI. Overwrites uri; the variable must be set at config-load time or loading fails.
mongo_secrets_filestringNon/aPath to a Sentinel-native secrets file supplying a MongoDB password, URI, and/or TLS key passphrase. mongodb only: rejected on any other type. See secrets files.
mongo_secrets_file_envstringNon/aName of an environment variable holding the path for mongo_secrets_file. Overwrites it; the variable must be set at config-load time or loading fails.
tlsmappingNon/aTLS settings for the database connection. Omitting it logs a tls_not_configured warning. See tls.
Added in v1.4.0

defaults_file, mongo_secrets_file, defaults_file_env, and mongo_secrets_file_env were introduced in Sentinel v1.4.0.

Database selection

KeyTypeRequiredDefaultDescription
databasestringYesn/aDatabase name, or * for auto-discovery. Supports ${VAR} interpolation.
excludelist of stringNon/aDatabase names to skip. Only meaningful with database: "*".
strategystringNoindividual when database: "*"Auto-discovery strategy: individual (one artifact per database) or single (one artifact for all).

Output and storage

KeyTypeRequiredDefaultDescription
outputstringNoSENTINEL_<timestamp> plus the engine extensionArtifact filename. Supports ${VAR} interpolation.
storagemappingConditionalinherits defaults.storageStorage backend for this job. An effective storage.type is required after inheritance. See storage blocks.
database_optionsmappingNon/aEngine-specific dump options. See database_options.
compressionmappingNoinherits defaults.compressionPipeline compression. See compression.
verify_after_uploadboolNoinherits integrity.verify_after_uploadRe-download the artifact from its storage backend after write and re-hash it against the manifest, failing the backup on mismatch.
Added in v1.3.0

verify_after_upload and the compression block were introduced in Sentinel v1.3.0.

Incremental and point-in-time recovery

KeyTypeRequiredDefaultDescription
pitr_enabledboolNofalseCapture PITR-related metadata for this job.
wal_archive_prefixstringNon/aLocation from which archived WAL segments can be retrieved. PostgreSQL-oriented.
incremental_metadata_enabledboolNofalseCapture lineage metadata for future incremental restores.
incremental_backupmappingNon/aChain policy and engine pre-checks. See incremental_backup.
mysqlmappingNon/aMySQL/MariaDB engine options. See mysql on a backup job.

Scheduling, retention, and notifications

KeyTypeRequiredDefaultDescription
schedulestringNoinherits defaults.schedule5-field cron expression. Rejected if unparseable or whitespace-only.
retentionmappingNoinherits defaults.retentionRetention policy for this job's artifacts. See retention.
notificationslistNoinherits defaults.notificationsNotification channels for this job. See notifications.

database_options

A free-form mapping whose allowed keys depend on type. An unrecognised key for the job's engine is a validation error.

PostgreSQL

KeyTypeRequiredDefaultDescription
pg_out_formatstringNon/apg_dump output format: p, c, t, or d.
compressintNon/apg_dump compression level, 0–9. Engine-native compression.
pg_compression_algostringNon/agzip, lz4, zstd, or none. Engine-native compression.
pg_compression_levelintNon/aCompression level, 1–9. Engine-native compression.

MySQL and MariaDB

KeyTypeRequiredDefaultDescription
single_transactionboolNon/aAdds --single-transaction to the dump.
routinesboolNon/aAdds --routines.
triggersboolNon/aAdds --triggers.
eventsboolNon/aAdds --events.

MongoDB

KeyTypeRequiredDefaultDescription
gzipboolNon/amongodump --gzip. Engine-native compression.
oplogboolNon/aAdds --oplog.
archiveboolNon/aAdds --archive.
Double compression is rejected

Pipeline compression.enabled: true may not coexist with engine-native compression; PostgreSQL compress / pg_compression_algo / pg_compression_level, or MongoDB gzip. Configuration validation fails rather than compressing twice.

Storage blocks

The same set of keys is used by storages.<name>, defaults.storage, and databases.<name>.storage. A job may reference a named storage with name and override individual fields on top of it.

KeyTypeRequiredDefaultDescription
typestringConditionaln/alocal, s3, gcs, google-drive, or azure. Required on the effective storage of every backup job.
namestringNon/aReference to a key in the top-level storages map. An unknown reference fails config load.
local_pathstringNon/aFilesystem directory for local storage. Supports ${VAR} interpolation.
s3_bucketstringConditionaln/aBucket name. Required for s3. Supports ${VAR} interpolation.
s3_bucket_endpointstringNon/aCustom endpoint for S3-compatible services. Supports ${VAR} interpolation.
s3_regionstringNon/aBucket region. Supports ${VAR} interpolation.
s3_access_key_idstringNon/aInline access key ID. Logs a plaintext_password_detected warning; prefer s3_access_key_id_env.
s3_access_key_id_envstringNon/aName of an environment variable holding the access key ID. Overwrites s3_access_key_id; the variable must be set at config-load time or loading fails.
s3_secret_access_keystringNon/aInline secret access key. Logs a plaintext_password_detected warning; prefer s3_secret_access_key_env.
s3_secret_access_key_envstringNon/aName of an environment variable holding the secret access key. Overwrites the inline field; the variable must be set at config-load time or loading fails.
gcs_bucketstringConditionaln/aBucket name. Required for gcs. Supports ${VAR} interpolation.
gcs_project_idstringNon/aGoogle Cloud project ID. Supports ${VAR} interpolation.
gcs_credentials_filestringNon/aPath to a service-account JSON file. Supports ${VAR} interpolation.
gdrive_folder_idstringConditionaln/aTarget folder ID. Required for google-drive. Supports ${VAR} interpolation.
gdrive_sa_filestringConditionaln/aPath to a service-account JSON file. Required for google-drive. Supports ${VAR} interpolation.
azure_storage_accountstringConditionaln/aStorage account name. Required for azure. Supports ${VAR} interpolation.
azure_storage_account_envstringNon/aName of an environment variable holding the account name. Overwrites the inline field; the variable must be set at config-load time or loading fails.
azure_storage_keystringNon/aInline account key. Logs a plaintext_password_detected warning; prefer azure_storage_key_env.
azure_storage_key_envstringNon/aName of an environment variable holding the account key. Overwrites the inline field; the variable must be set at config-load time or loading fails.
azure_containerstringConditionaln/aBlob container name. Required for azure. Supports ${VAR} interpolation.

retention

Used by defaults.retention and databases.<name>.retention. A backup is kept if any rule keeps it.

KeyTypeRequiredDefaultDescription
keep_lastintNon/aKeep the N most recent backups.
keep_daysintNon/aKeep backups from the last N days.
dry_runboolNofalsePreview deletions without executing them. Requires at least one of keep_last, keep_days, or gfs.
gfsmappingNon/aGrandfather-Father-Son calendar-tier rules. See below.

retention.gfs

Each tier keeps the newest backup of each of the N most-recent occupied calendar buckets, computed in UTC. Empty periods are skipped, not backfilled. All values must be greater than or equal to 0.

KeyTypeRequiredDefaultDescription
keep_dailyintNon/aKeep the newest backup of each of the last N calendar days.
keep_weeklyintNon/aKeep the newest backup of each of the last N ISO weeks (Monday–Sunday).
keep_monthlyintNon/aKeep the newest backup of each of the last N calendar months.
keep_yearlyintNon/aKeep the newest backup of each of the last N calendar years.
Added in v1.3.0

The retention.gfs block was introduced in Sentinel v1.3.0.

compression

Engine-agnostic streaming compression inserted between the dump and the hash/encrypt steps. Used by defaults.compression and databases.<name>.compression.

KeyTypeRequiredDefaultDescription
enabledboolNofalseTurn pipeline compression on.
algorithmstringNozstd when enabledgzip, zstd, or none. enabled: true with none is a validation error.
levelintNo6 for gzip, 3 for zstdCodec level: 1–9 for gzip, 1–19 for zstd.

tls

Per-job TLS settings for the database connection. Applies to all four engines.

KeyTypeRequiredDefaultDescription
enabledboolNofalseWhether TLS settings are applied. The rest of the block is validated only when this is true.
modestringNopreferrequire, verify-ca, verify-full, or prefer.
ca_certstringConditionaln/aPath to the CA certificate. Required when mode is verify-ca or verify-full.
client_certstringConditionaln/aPath to the client certificate for mutual TLS. Must be set together with client_key.
client_keystringConditionaln/aPath to the client private key. Must be set together with client_cert.
client_key_password_envstringNon/aName of an environment variable holding the passphrase for an encrypted client_key. Requires client_key to be set. Takes precedence over a passphrase supplied by mongo_secrets_file.

notifications

A list of channels. Used by defaults.notifications, databases.<name>.notifications, and restores.<name>.notifications.

KeyTypeRequiredDefaultDescription
typestringYesn/aslack, discord, webhook, or email.
enabledboolNotrueWhether this channel is dispatched to.
eventslist of stringYesn/aAt least one of success, failure, warning.
webhook_url_envstringConditionaln/aName of an environment variable holding the webhook URL. Required for slack, discord, and webhook; the variable must be set at config-load time or loading fails.
timeout_secondsintNo10 for slack/discord/webhookHTTP timeout. Must be between 1 and 60.
smtp_hoststringConditionaln/aSMTP server hostname. Required for email. Supports ${VAR} interpolation.
smtp_portintNon/aSMTP server port. Must be between 1 and 65535.
smtp_username_envstringNon/aName of an environment variable holding the SMTP username.
smtp_password_envstringConditionaln/aName of an environment variable holding the SMTP password. Required for email; the variable must be set at config-load time or loading fails.
from_address_envstringConditionaln/aName of an environment variable holding the sender address. Required for email; the variable must be set at config-load time or loading fails.
to_addresseslist of stringConditionaln/aRecipient addresses. Required for email. Supports ${VAR} interpolation.
use_tlsboolNotrue for emailUse TLS for the SMTP connection.

incremental_backup

Per-job chain policy and engine pre-checks.

KeyTypeRequiredDefaultDescription
enabledboolNofalseEnable chain-based incremental backups. Supported for postgres, mysql, mariadb, and mongodb; any other type is a validation error.
max_chain_depthintNo6Depth at which the chain resets by producing a new full backup. Must be greater than or equal to 0.
wal_summary_checkboolNofalseVerify PostgreSQL wal_summary=on before an incremental backup. postgres only.
binlog_checkboolNofalseVerify MySQL/MariaDB log_bin=ON before an incremental backup. mysql/mariadb only.
oplog_window_warn_hoursintNon/aWarn when the MongoDB oplog window falls below this many hours. Must be greater than or equal to 0. mongodb only.

mysql on a backup job

KeyTypeRequiredDefaultDescription
binlog_pathstringConditionaln/aLocal or mounted path to the binary logs, readable by Sentinel. Required when incremental_backup.enabled is true for mysql/mariadb. mysql/mariadb only.

scheduler

KeyTypeRequiredDefaultDescription
max_concurrent_backupsintNothe top-level max_concurrent_backupsScheduler-side backup concurrency limit.
max_concurrent_restoresintNo1Scheduler-side restore concurrency limit.
job_timeout_minutesintNo180Per-job timeout in minutes.
stale_lock_thresholdintNo60Age in minutes after which a lock held by a dead process is treated as stale.
lock_dirstringNo/var/run/sentinelDirectory for per-job lock files.

integrity

KeyTypeRequiredDefaultDescription
algorithmstringNosha256Hash algorithm for integrity verification. Only sha256 is accepted.
verify_after_uploadboolNofalseDefault for backup jobs: re-download and re-hash each artifact after upload. Overridden per job by verify_after_upload.
scheduled_checkmappingNon/aCron-driven repository integrity sweep. See below.

integrity.scheduled_check

When enabled, the scheduler registers a reserved __integrity_check job that runs the same sweep as backup verify --all.

KeyTypeRequiredDefaultDescription
enabledboolNofalseTurn the scheduled sweep on.
cronstringConditionaln/a5-field cron expression. Required when enabled is true.
sincestringNon/aRecency window restricting the sweep to newer backups. Accepts an integer with a d or w suffix (30d, 4w) or any Go duration (720h). Empty means all backups.
notify_onstringNofailurefailure, always, or never.
jobstringNon/aRestrict the sweep to a single named backup job.
Added in v1.3.0

integrity.scheduled_check and integrity.verify_after_upload were introduced in Sentinel v1.3.0.

restore

Shared runtime settings for restore execution. Both keys supply defaults for every restore job.

KeyTypeRequiredDefaultDescription
staging_dirstringNo/tmp/sentinelBase directory for staged restore artifacts. Supports ${VAR} interpolation.
keep_fileboolNofalseRetain staged artifacts after execution, for debugging.

restores

Each entry under restores is a restore job; the map key is the job name. Restore jobs default to disabled: unlike backup jobs, they must be enabled explicitly. The name __integrity_check is reserved and rejected.

Restore job identity and connection

KeyTypeRequiredDefaultDescription
enabledboolNofalseWhether the scheduler runs this job.
typestringYesn/aOne of postgres, mysql, mariadb, mongodb.
hoststringConditionaln/aTarget hostname. Required (or host_env) for postgres, mysql, mariadb. Supports ${VAR} interpolation.
host_envstringNon/aName of an environment variable holding the host. Overwrites host; the variable must be set at config-load time or loading fails.
portintNon/aTarget port.
usernamestringConditionaln/aLogin user. Required (or username_env) for postgres, mysql, mariadb. Supports ${VAR} interpolation.
username_envstringNon/aName of an environment variable holding the username. Overwrites username; the variable must be set at config-load time or loading fails.
password_envstringNon/aName of an environment variable holding the password. Resolved at restore time; an unset variable fails the restore.
uristringConditionaln/aMongoDB connection URI. Required (or uri_env) for mongodb. Supports ${VAR} interpolation.
uri_envstringNon/aName of an environment variable holding the MongoDB URI. Overwrites uri; the variable must be set at config-load time or loading fails.
databasestringConditionaln/aDatabase to restore into. Required for postgres, mysql, mariadb. Supports ${VAR} interpolation.

Restore source and scheduling

KeyTypeRequiredDefaultDescription
backup_sourcemappingYesn/aWhere the artifact is read from. See backup_source.
schedulestringConditionaln/a5-field cron expression. Required when the job is enabled.
timeout_secondsintNon/aMaximum duration for the restore. Must be non-negative.
staging_dirstringNoinherits restore.staging_dirStaging directory override for this job. Must be non-empty after inheritance.
keep_fileboolNoinherits restore.keep_fileRetain the staged artifact after the restore attempt.
notificationslistNon/aNotification channels for restore results. See notifications.
retentionmappingNon/aRetention for restore backup files. See restore retention.

Restore mode and targets

KeyTypeRequiredDefaultDescription
restore_modestringNofullfull, pitr, or incremental.
pitr_timestampstringConditionaln/aRFC3339 timestamp with timezone. Required when restore_mode: pitr; rejected in other modes. postgres only: pitr mode is rejected for other engines.
pitr_target_timelinestringNon/aRecovery timeline for PITR. Valid only when restore_mode: pitr.
incremental_from_backupstringConditionaln/aBaseline backup for incremental planning. Required when restore_mode: incremental; rejected in other modes.
confirm_full_fallbackboolNofalseAuthorise falling back to a full restore. Valid only when restore_mode: incremental.
mysqlmappingNon/aBinlog replay selectors. See restore engine blocks.
mongodbmappingNon/aOplog replay options. See restore engine blocks.

Restore behaviour

KeyTypeRequiredDefaultDescription
restore_optionsmappingNon/aEngine restore flags. See restore_options.
verify_after_restoreboolNofalseRun post-restore verification.
conflict_strategystringNoerrorWhat to do when data already exists: ignore, replace, or error.
allow_cascadeboolNofalsePermit DROP ... CASCADE during a replace. postgres only: and required when conflict_strategy: replace on postgres.
Destructive

conflict_strategy: replace overwrites the target database, and on PostgreSQL allow_cascade: true additionally removes dependent objects. Confirm the artifact is sound with sentinel backup verify <id> before enabling either.

backup_source

Where a restore job reads its artifact from.

KeyTypeRequiredDefaultDescription
typestringYesn/alocal, s3, or gcs. Any other value is rejected. Supports ${VAR} interpolation.
backup_pathstringYesn/aObject path or filename. Supports ${VAR} interpolation.
use_latest_matchboolNofalseWhen backup_path is a pattern such as *.sql, select the most recent match.
local_pathstringConditionaln/aFilesystem directory. Required when type: local. Supports ${VAR} interpolation.
s3_bucketstringConditionaln/aBucket name. Required when type: s3. Supports ${VAR} interpolation.
s3_bucket_endpointstringNon/aCustom endpoint for S3-compatible services. Supports ${VAR} interpolation.
s3_regionstringNon/aBucket region. Supports ${VAR} interpolation.
s3_access_key_idstringNon/aInline access key ID. Prefer s3_access_key_id_env.
s3_access_key_id_envstringNon/aName of an environment variable holding the access key ID. Overwrites the inline field; the variable must be set at config-load time or loading fails.
s3_secret_access_keystringNon/aInline secret access key. Prefer s3_secret_access_key_env.
s3_secret_access_key_envstringNon/aName of an environment variable holding the secret access key. Overwrites the inline field; the variable must be set at config-load time or loading fails.
gcs_bucketstringConditionaln/aBucket name. Required when type: gcs. Supports ${VAR} interpolation.
gcs_project_idstringNon/aGoogle Cloud project ID. Supports ${VAR} interpolation.
gcs_credentials_filestringNon/aPath to a service-account JSON file. Supports ${VAR} interpolation.
gdrive_folder_idstringNon/aGoogle Drive folder ID. Parsed and interpolated, but type: google-drive is not an accepted restore source today.
gdrive_sa_filestringNon/aPath to a Google Drive service-account JSON file. Same restriction as gdrive_folder_id.
azure_storage_accountstringNon/aAzure storage account name. Parsed and interpolated, but type: azure is not an accepted restore source today.
azure_storage_account_envstringNon/aName of an environment variable holding the account name. Overwrites the inline field; the variable must be set at config-load time or loading fails.
azure_storage_keystringNon/aInline Azure account key. Prefer azure_storage_key_env.
azure_storage_key_envstringNon/aName of an environment variable holding the account key. Overwrites the inline field; the variable must be set at config-load time or loading fails.
azure_containerstringNon/aAzure blob container. Same restriction as azure_storage_account.

restore_options

A free-form mapping. These are the keys the restore argument builder acts on; unrecognised keys are ignored rather than rejected.

KeyTypeRequiredDefaultDescription
cleanboolNon/aAdds --clean.
if_existsboolNon/aAdds --if-exists.
no_ownerboolNon/aAdds --no-owner.
no_privilegesboolNon/aAdds --no-privileges.
gzipboolNon/aAdds --gzip. mongodb only in the additional-args path.
archiveboolNon/aRestore from an archive file. mongodb only.
additional_argsstringNon/aExtra arguments, shell-quoted. Must be a string, and must parse at config-load time.

Restore retention

Used by restores.<name>.retention.

KeyTypeRequiredDefaultDescription
keep_lastintNon/aKeep the last N restore backup files. 0 means no limit. Must be non-negative.
keep_daysintNon/aKeep restore backup files from the last N days. 0 means no limit. Must be non-negative.
dry_runboolNofalsePreview deletions without removing files.

Restore engine blocks

mysql on a restore job

Both selectors are mutually exclusive, and both are mysql/mariadb only.

KeyTypeRequiredDefaultDescription
binlog_target_timestringNon/aRFC3339 timestamp with timezone at which binlog replay stops.
binlog_target_positionmappingNon/aExplicit binlog stop position. Requires both sub-keys below.

The binlog_target_position mapping:

KeyTypeRequiredDefaultDescription
filestringYesn/aBinary log filename. Must be non-empty.
posintYesn/aPosition within the file. Must be greater than 0.

mongodb on a restore job

KeyTypeRequiredDefaultDescription
oplog_target_timestampstringNon/aRFC3339 timestamp with timezone at which oplog replay stops. mongodb only.

Secrets files

A secrets file is a separate file referenced from a backup job, not a block inside the main configuration. Both kinds may be stored encrypted; encryption is auto-detected from the file's content and the file is decrypted in memory using secrets_key_env / secrets_key_file, falling back to encryption_key_env / encryption_key_file. A plaintext file that is group- or world-readable produces a permission warning.

MySQL and MariaDB defaults_file

A standard option file. Only the [client] section is read; no tool-specific sections, no !include or !includedir directives. It can supply host, user, password, and port, each used only when the corresponding job field is left unset.

MongoDB mongo_secrets_file

A Sentinel-native YAML file. All three keys are optional.

KeyTypeRequiredDefaultDescription
uristringNon/aFull connection URI. Used only when the job sets neither uri nor uri_env.
passwordstringNon/aPassword composed into the job's URI userinfo. Fails config load if the URI already carries a password, or if no username can be resolved.
ssl_pem_key_passwordstringNon/aPassphrase for an encrypted TLS client key. Used only when tls.client_key_password_env is unset.
Added in v1.4.0

Both secrets-file mechanisms, their *_env path indirection, and at-rest encryption were introduced in Sentinel v1.4.0.

Environment variables and interpolation

Sentinel resolves external values in two distinct ways.

The *_env family; host_env, username_env, password_env, uri_env, defaults_file_env, mongo_secrets_file_env, webhook_url_env, smtp_username_env, smtp_password_env, from_address_env, client_key_password_env, s3_access_key_id_env, s3_secret_access_key_env, azure_storage_account_env, azure_storage_key_env, plus the top-level encryption_key_env and secrets_key_env. Each names an environment variable, never a value. The variable name must match ^[A-Z_][A-Z0-9_]*$. When the field is set, the resolved value overwrites its inline counterpart, and an unset or empty variable fails configuration load with an error naming the job and the variable; never a silent fallback.

${VAR} interpolation: a subset of string fields (paths, hostnames, bucket names, usernames, URIs, output names, SMTP hosts, recipient addresses) expand ${VAR} references inline. The same name pattern applies, and an unset variable is likewise a load-time error.

Not part of the loaded schema

Three structures carry YAML tags in the source but are not reachable from the top-level configuration that Sentinel parses, so their keys have no effect in a configuration file:

StructureKeysStatus
AzureConfig / AzureAuthConfigaccount_name, container, tier, auth.type, auth.connection_string, auth.connection_string_env, auth.sas_token, auth.sas_token_envNot referenced by any parsed block. Configure Azure through the azure_* keys in a storage block.
RestoreDefaultsrestore_defaults and its sub-keysDefined on a RestoreConfiguration type that the loader never parses. Set the equivalent fields directly on each restore job.

A complete example

version: "1.0"

log_format: json
history_db_path: ~/.sentinel/history.db
max_concurrent_backups: 3
max_concurrent_restores: 1

encryption_key_env: SENTINEL_MASTER_KEY
secrets_key_env: SENTINEL_SECRETS_KEY

scheduler:
job_timeout_minutes: 180
stale_lock_threshold: 60
lock_dir: /var/run/sentinel

integrity:
algorithm: sha256
verify_after_upload: true
scheduled_check:
enabled: true
cron: "30 4 * * 0"
since: 30d
notify_on: failure

storages:
primary-s3:
type: s3
s3_bucket: example-backups
s3_region: eu-west-3
s3_access_key_id_env: AWS_ACCESS_KEY_ID
s3_secret_access_key_env: AWS_SECRET_ACCESS_KEY

defaults:
schedule: "0 2 * * *"
storage:
name: primary-s3
retention:
keep_last: 14
gfs:
keep_daily: 7
keep_weekly: 4
keep_monthly: 12
compression:
enabled: true
algorithm: zstd
level: 3
notifications:
- type: slack
webhook_url_env: SLACK_WEBHOOK_URL
events: [failure, warning]

databases:
app-postgres:
type: postgres
host: pg.internal.example
port: 5432
username: sentinel
password_env: PG_BACKUP_PASSWORD
database: appdb
tls:
enabled: true
mode: verify-full
ca_cert: /etc/sentinel/certs/pg-ca.pem
pitr_enabled: true
wal_archive_prefix: s3://example-backups/wal/app-postgres
incremental_backup:
enabled: true
max_chain_depth: 6
wal_summary_check: true
database_options:
pg_out_format: c

reporting-mysql:
type: mysql
defaults_file_env: MYSQL_DEFAULTS_FILE
database: "*"
strategy: individual
exclude: [information_schema, performance_schema]
schedule: "0 3 * * *"
mysql:
binlog_path: /var/lib/mysql
incremental_backup:
enabled: true
binlog_check: true

events-mongo:
type: mongodb
uri_env: MONGO_URI
mongo_secrets_file: /etc/sentinel/mongo-secrets.enc.yaml
database: events
database_options:
oplog: true
storage:
type: local
local_path: /var/backups/sentinel

restore:
staging_dir: /var/tmp/sentinel-restore
keep_file: false

restores:
weekly-restore-test:
enabled: true
type: postgres
host: pg-verify.internal.example
port: 5432
username: sentinel
password_env: PG_RESTORE_PASSWORD
database: appdb_verify
schedule: "0 5 * * 6"
restore_mode: full
conflict_strategy: error
verify_after_restore: true
timeout_seconds: 3600
backup_source:
type: s3
s3_bucket: example-backups
s3_region: eu-west-3
s3_access_key_id_env: AWS_ACCESS_KEY_ID
s3_secret_access_key_env: AWS_SECRET_ACCESS_KEY
backup_path: "app-postgres/*.dump"
use_latest_match: true
restore_options:
no_owner: true
no_privileges: true
retention:
keep_last: 4

{/* sources: internal/config/types.go, internal/config/restore_types.go, internal/config/loader.go, internal/config/validator.go, internal/config/env.go, internal/config/since.go, internal/config/marshal.go, internal/config/defaults_file_resolve.go, internal/config/mongo_secrets_file.go, internal/config/secrets_file_crypto.go, internal/adapters/storage/validation.go, internal/ports/tls.go, internal/domain/backup/validator.go, release-notes.md */}