Add stage parameter for backup hooks and add immich_upload backup
This commit is contained in:
parent
4db5c1878b
commit
759368b6d6
8 changed files with 49 additions and 11 deletions
12
playbooks/roles/backup/files/hooks/immich_upload
Executable file
12
playbooks/roles/backup/files/hooks/immich_upload
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
backup_path="$1"
|
||||
stage="$2"
|
||||
|
||||
if [ "$stage" == "before" ]; then
|
||||
rclone mount --config /opt/services/backup/rclone.conf --daemon immich_upload: "$backup_path"
|
||||
fi
|
||||
|
||||
if [ "$stage" == "after" ]; then
|
||||
unmount "$backup_path"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue