matrix: add initial conduit-only config
This commit is contained in:
parent
b5e9afe5a4
commit
ef8f5da37d
11 changed files with 182 additions and 0 deletions
14
roles/matrix/files/matrix.backup.sh
Normal file
14
roles/matrix/files/matrix.backup.sh
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Conduit
|
||||
|
||||
data_dir='/mnt/data1/matrix/conduit'
|
||||
snapshot_dir="${data_dir}.snapshot"
|
||||
|
||||
# Read-only snapshot for atomic backup
|
||||
btrfs subvolume snapshot -r "$data_dir" "$snapshot_dir" || exit $?
|
||||
|
||||
/usr/local/bin/restic backup "$snapshot_dir"
|
||||
|
||||
# Always remove snapshot subvolume, even if restic fails
|
||||
btrfs subvolume delete "$snapshot_dir"
|
||||
Loading…
Add table
Add a link
Reference in a new issue