The arr apps keep SQLite databases; a consistent copy of a live one is sqlite3's .backup. Declared once, by the holder that runs the copies, rather than by each app.
70 lines
1.5 KiB
JSON
70 lines
1.5 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"
|
|
},
|
|
{
|
|
"id": "sqlite",
|
|
"type": "package",
|
|
"package": "sqlite"
|
|
}
|
|
],
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "tools",
|
|
"kind": "bundle",
|
|
"language": "go",
|
|
"system": "arch",
|
|
"from": "cmd/restic-backups",
|
|
"binary": "restic-backups",
|
|
"loads": [
|
|
"restic-backups"
|
|
],
|
|
"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}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|