2019-02-22 21:26:01 +01:00
|
|
|
### backive config schema
|
|
|
|
#
|
|
|
|
#
|
2020-03-18 21:09:17 +01:00
|
|
|
|
2019-02-22 21:26:01 +01:00
|
|
|
definitions:
|
|
|
|
device_section:
|
|
|
|
type: object
|
|
|
|
patternProperties:
|
2019-05-03 20:36:09 +02:00
|
|
|
"^[^ \t/\\]+$":
|
2020-01-05 13:17:46 +01:00
|
|
|
# The pattern can be any name...
|
2019-05-03 20:36:09 +02:00
|
|
|
# "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$":
|
2019-02-22 21:26:01 +01:00
|
|
|
type: object
|
|
|
|
properties:
|
2020-01-05 13:17:46 +01:00
|
|
|
uuid:
|
2019-02-22 21:26:01 +01:00
|
|
|
type: string
|
|
|
|
mountname:
|
|
|
|
type: string
|
|
|
|
required:
|
|
|
|
- mountname
|
2020-01-05 13:17:46 +01:00
|
|
|
- uuid
|
2019-02-22 21:26:01 +01:00
|
|
|
additionalProperties: false
|
|
|
|
backup_section:
|
|
|
|
type: object
|
|
|
|
patternProperties:
|
|
|
|
"^[a-zA-Z0-9_-]+$":
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
user:
|
|
|
|
type: string
|
|
|
|
from:
|
|
|
|
type: string
|
2020-01-05 13:17:46 +01:00
|
|
|
# from directory
|
|
|
|
# from_remote:
|
|
|
|
# type: object
|
|
|
|
# properties:
|
|
|
|
# user:
|
|
|
|
# type: string
|
|
|
|
# password:
|
|
|
|
# type: string
|
|
|
|
# ssh_key_path:
|
|
|
|
# type: string
|
2019-02-22 21:26:01 +01:00
|
|
|
to:
|
|
|
|
type: string
|
2020-01-05 13:17:46 +01:00
|
|
|
# to directory
|
2019-02-22 21:26:01 +01:00
|
|
|
target_device:
|
|
|
|
type: string
|
2020-01-05 13:17:46 +01:00
|
|
|
# target device name
|
2019-02-22 21:26:01 +01:00
|
|
|
frequency:
|
2020-01-06 23:01:25 +01:00
|
|
|
# JUST DAYS!
|
|
|
|
type: integer
|
|
|
|
# other possibilities in the future
|
2020-01-05 13:17:46 +01:00
|
|
|
# weekly, biweekly, monthly, yearly
|
|
|
|
# 7d, 2w, 1m, 1y (this needs parser)
|
|
|
|
script:
|
|
|
|
type: string
|
|
|
|
# MVP just executes a script, nothing else
|
|
|
|
# scripts:
|
|
|
|
# type: array
|
|
|
|
# items:
|
|
|
|
# type: object
|
|
|
|
# properties:
|
|
|
|
# target:
|
|
|
|
# enum: [ "local", "remote" ]
|
|
|
|
# script:
|
|
|
|
# type: string
|
|
|
|
# execute: [ "before", "after" ]
|
|
|
|
# additionalProperties: false
|
|
|
|
# tool:
|
|
|
|
# type: object
|
2019-02-22 21:26:01 +01:00
|
|
|
required:
|
|
|
|
- target_device
|
2020-01-05 13:17:46 +01:00
|
|
|
- script
|
2020-01-06 23:01:25 +01:00
|
|
|
- frequency
|
2019-02-22 21:26:01 +01:00
|
|
|
additionalProperties: false
|
|
|
|
preferences_section:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
mount_root:
|
|
|
|
type: string
|
|
|
|
pattern: "^(/[^/]+)+$"
|
|
|
|
additionalProperties: false
|
|
|
|
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
devices:
|
|
|
|
"$ref": "#:/definitions/device_section"
|
|
|
|
backups:
|
|
|
|
"$ref": "#:/definitions/backup_section"
|
|
|
|
preferences:
|
|
|
|
"$ref": "#:/definitions/preferences_section"
|