snapshot: add cron for btrbk
This commit is contained in:
parent
2d6a1bb57d
commit
386fdb9280
|
@ -168,8 +168,11 @@ snapper:
|
|||
# NOTE: some caveats to reduce config complexity
|
||||
# - use the same targets for all subvolumes in each volume definition
|
||||
# - use the same global retention policy for snapshot/backup/archive
|
||||
# - there's only 1 global ssh config
|
||||
# - there's only 1 global ssh config, 1 global crontab
|
||||
btrbk:
|
||||
cron:
|
||||
hourly: snapshot
|
||||
daily: resume
|
||||
options:
|
||||
lockfile: /var/lock/btrbk.lock
|
||||
logfile: /var/log/btrbk.log
|
||||
|
|
|
@ -13,3 +13,14 @@
|
|||
group: root
|
||||
notify:
|
||||
- Create snapshots btrfs subvolumes manually
|
||||
|
||||
- name: btrbk | Create btrbk crontabs
|
||||
copy:
|
||||
content: |
|
||||
#!/bin/sh
|
||||
TZ=UTC exec /usr/bin/btrbk -q {{ item.value }}
|
||||
dest: /etc/periodic/{{ item.key }}/btrbk
|
||||
mode: '755'
|
||||
owner: root
|
||||
group: root
|
||||
loop: '{{ btrbk.cron | dict2items }}'
|
||||
|
|
Reference in New Issue