ADR 0214 / to-be 43. restic keeps one repository per machine and takes a nightly snapshot per module — 14 daily, 8 weekly, 6 monthly — and restores beside the live data, never over it. postgres, mssql and mongodb contribute a consistent dump; minio, influxdb, the vault, mailu, gitea and nextcloud the directories that hold their data.
65 lines
1.4 KiB
JSON
65 lines
1.4 KiB
JSON
{
|
|
"module": "restic",
|
|
"version": "1",
|
|
"claims": [
|
|
{
|
|
"name": "node-backup",
|
|
"scope": "node",
|
|
"serves": [
|
|
"backed-up",
|
|
"now",
|
|
"restore"
|
|
]
|
|
}
|
|
],
|
|
"own-secrets": {
|
|
"repository": "${dir:state}/repository.secret"
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "."
|
|
},
|
|
{
|
|
"id": "repository",
|
|
"type": "directory",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "declared",
|
|
"type": "file",
|
|
"path": "${dir:state}/backups.conf",
|
|
"mode": "0600",
|
|
"content": "# What the modules on this machine back up, composed by the mesh (novox/hq to-be 43). Do not edit.\n${contribution:node-backup:backup}"
|
|
},
|
|
{
|
|
"id": "tool",
|
|
"type": "package",
|
|
"package": "restic"
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "tools",
|
|
"kind": "bundle",
|
|
"language": "typescript",
|
|
"entrypoints": [
|
|
"tools/index.js"
|
|
],
|
|
"loads": [
|
|
"tools/index.js"
|
|
],
|
|
"env": {
|
|
"MESH_BACKUP_DECLARED": "${dir:state}/backups.conf",
|
|
"MESH_BACKUP_REPOSITORY": "${dir:repository}",
|
|
"MESH_BACKUP_PASSWORD_FILE": "${dir:state}/repository.secret",
|
|
"MESH_BACKUP_STATE": "${dir:state}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|