gitea: add config
This commit is contained in:
parent
fe35e4baf1
commit
56faa4323b
17 changed files with 354 additions and 13 deletions
12
roles/gitea/files/gitea.lfs.backup.sh
Normal file
12
roles/gitea/files/gitea.lfs.backup.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
data_dir='/mnt/data1/gitea/lfs'
|
||||
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