2023-01-17 06:55:28 +00:00
|
|
|
commands:
|
|
|
|
stop-docker-container:
|
|
|
|
cmd: docker
|
2023-02-02 05:45:23 +00:00
|
|
|
Args:
|
2023-01-17 06:55:28 +00:00
|
|
|
- compose
|
|
|
|
- -f /some/path/to/docker-compose.yaml
|
|
|
|
- down
|
2023-02-02 05:45:23 +00:00
|
|
|
# if host is not defined, cmd will be run locally
|
2023-01-17 06:55:28 +00:00
|
|
|
host: some-host
|
|
|
|
backup-docker-container-script:
|
|
|
|
cmd: /path/to/script
|
2023-02-02 05:45:23 +00:00
|
|
|
# The host has to be defined in the config file
|
2023-01-17 06:55:28 +00:00
|
|
|
host: some-host
|
2023-02-12 05:50:19 +00:00
|
|
|
environment:
|
|
|
|
- FOO=BAR
|
|
|
|
- APP=$VAR
|
2023-01-17 06:55:28 +00:00
|
|
|
shell-cmd:
|
|
|
|
cmd: rsync
|
|
|
|
shell: bash
|
2023-02-02 05:45:23 +00:00
|
|
|
Args:
|
2023-01-17 06:55:28 +00:00
|
|
|
- -av some-host:/path/to/data ~/Docker/Backups/docker-data
|
|
|
|
hostname:
|
|
|
|
cmd: hostname
|
|
|
|
|
|
|
|
cmd-configs:
|
2023-02-02 05:45:23 +00:00
|
|
|
cmds-to-run: # this can be any name you want
|
2023-01-17 06:55:28 +00:00
|
|
|
# all commands have to be defined
|
|
|
|
order:
|
|
|
|
- stop-docker-container
|
|
|
|
- backup-docker-container-script
|
|
|
|
- shell-cmd
|
|
|
|
- hostname
|
|
|
|
notifications:
|
|
|
|
- matrix
|
2023-02-02 05:45:23 +00:00
|
|
|
name: backup-some-server
|
2023-02-12 14:29:55 +00:00
|
|
|
cron: "0 0 1 * * *"
|
2023-01-17 06:55:28 +00:00
|
|
|
hostname:
|
2023-02-02 05:45:23 +00:00
|
|
|
name: hostname
|
2023-01-17 06:55:28 +00:00
|
|
|
order:
|
|
|
|
- hostname
|
|
|
|
notifications:
|
|
|
|
- prod-email
|
|
|
|
|
|
|
|
hosts:
|
2023-02-12 05:50:19 +00:00
|
|
|
# any ssh_config(5) keys/values not listed here will be looked up in the config file or the default config file
|
2023-01-17 06:55:28 +00:00
|
|
|
some-host:
|
2023-02-02 05:45:23 +00:00
|
|
|
hostname: some-hostname
|
|
|
|
config: ~/.ssh/config
|
|
|
|
user: user
|
|
|
|
privatekeypath: /path/to/private/key
|
|
|
|
port: 22
|
2023-02-12 05:50:19 +00:00
|
|
|
# can also be env:VAR
|
|
|
|
password: file:/path/to/file
|
|
|
|
# only one is supported for now
|
|
|
|
proxyjump: some-proxy-host
|
2023-01-17 06:55:28 +00:00
|
|
|
|
2023-02-12 05:50:19 +00:00
|
|
|
# optional
|
2023-01-17 06:55:28 +00:00
|
|
|
logging:
|
|
|
|
verbose: true
|
|
|
|
file: /path/to/logs/commands.log
|
2023-02-02 05:45:23 +00:00
|
|
|
console: false
|
|
|
|
cmd-std-out: false
|
2023-01-17 06:55:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
notifications:
|
|
|
|
prod-email:
|
|
|
|
id: prod-email
|
|
|
|
type: mail
|
2023-02-12 05:50:19 +00:00
|
|
|
host: yourhost.tld
|
|
|
|
port: 587
|
2023-01-17 06:55:28 +00:00
|
|
|
senderAddress: email@domain.tld
|
|
|
|
to:
|
|
|
|
- admin@domain.tld
|
|
|
|
username: smtp-username@domain.tld
|
|
|
|
password: your-password-here
|
|
|
|
matrix:
|
|
|
|
id: matrix
|
|
|
|
type: matrix
|
|
|
|
home-server: your-home-server.tld
|
|
|
|
room-id: room-id
|
|
|
|
access-token: your-access-token
|
|
|
|
user-id: your-user-id
|