103 lines
3.5 KiB
YAML
103 lines
3.5 KiB
YAML
mainunit: backup-manager.timer
|
|
mainunitfile: backup-manager.timer.j2
|
|
templatefiles:
|
|
- src: backup-manager.service.j2
|
|
dest: ~/.config/systemd/user/backup-manager.service
|
|
- src: backupmanager.j2
|
|
dest: ~/backupmanager
|
|
mode: "0755"
|
|
- src: monitor@.service.j2
|
|
dest: ~/.config/systemd/user/monitor@.service
|
|
- src: monitor.socket.j2
|
|
dest: ~/.config/systemd/user/monitor.socket
|
|
- src: monitor.sh.j2
|
|
dest: ~/monitor.sh
|
|
mode: "0755"
|
|
- src: monitor-test.sh.j2
|
|
dest: ~/monitor-test.sh
|
|
mode: "0755"
|
|
backuptype: none
|
|
configdefinition:
|
|
"$id": "backup manager config"
|
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
description: backup-manager configuration
|
|
type: object
|
|
additionalProperties: false
|
|
properties:
|
|
default_cleanup_parameters:
|
|
type: string
|
|
default: "--keep-last 5 --keep-hourly 24 --keep-daily 5 --group-by host"
|
|
description: The default cleanup parameters when they have not been specified
|
|
repos:
|
|
type: array
|
|
description: All repos that will be kept in sync.
|
|
items:
|
|
type: object
|
|
additionalProperties: false
|
|
properties:
|
|
name:
|
|
type: string
|
|
description: Name of the repository. Used for display purposes but also for the status file
|
|
url:
|
|
type: string
|
|
description: The url for the repository
|
|
key:
|
|
type: string
|
|
description: The encryption key for the repository
|
|
hosts:
|
|
type: array
|
|
description: The list of hostnames that are and should be on this repository
|
|
items:
|
|
type: string
|
|
description: Hostname
|
|
minItems: 1
|
|
cleanup_parameters:
|
|
type: string
|
|
description: The cleanup parameters used for this repository. Defaults to default_cleanup_parameters when not specified
|
|
check_repo:
|
|
type: boolean
|
|
default: false
|
|
description: Whether we need to perform a check on the repository
|
|
required:
|
|
- url
|
|
- key
|
|
- hosts
|
|
- name
|
|
hosts:
|
|
type: object
|
|
description: Settings per host being backed up
|
|
default: {}
|
|
additionalProperties:
|
|
type: object
|
|
additionalProperties: false
|
|
properties:
|
|
idle:
|
|
type: boolean
|
|
default: false
|
|
description: An idle repository will never give warnings that there are no recent backups
|
|
timeout:
|
|
type: integer
|
|
# note that the default is also in the python code - in case the host isn't filled in
|
|
default: 10
|
|
description: Repositories where the latest backup is older then timeout days will give a warning that there are no recent backups
|
|
required:
|
|
- repos
|
|
exports:
|
|
monitoring:
|
|
checks:
|
|
- name: main
|
|
message: Backup manager activated
|
|
interval: 3600
|
|
type: string
|
|
okvalue: active
|
|
- name: lastrun
|
|
message: Errors last run
|
|
interval: 3600
|
|
type: string
|
|
okvalue: ""
|
|
- name: lastrunrecent
|
|
message: Backup manager did not run recently
|
|
interval: 3600
|
|
type: string
|
|
okvalue: "OK"
|
|
|