Supporting adjust volume size & pre-update backups.

This commit is contained in:
2026-06-17 12:01:35 -07:00
parent d1e8e0b5dc
commit 7df2c07313
16 changed files with 175 additions and 54 deletions

View File

@@ -20,6 +20,27 @@
},
"execute-command": "/etc/webhook/queue-restic-snapshot.sh"
},
{
"id": "queue-restic-snapshot-no-restart",
"pass-environment-to-command": [
{"source": "payload", "name": "version"},
{"source": "payload", "name": "path"},
{"source": "payload", "name": "tag"},
{"source": "payload", "name": "request_id"}
],
"trigger-rule":
{
"match": {
"type": "payload-hmac-sha256",
"secret": "$INSTANCE_CONTROL_WEBHOOKS_SECRET",
"parameter": {
"source": "header",
"name": "X-Nassella-Signature"
}
}
},
"execute-command": "/etc/webhook/queue-restic-snapshot-no-restart.sh"
},
{
"id": "restic-snapshot-status",
"include-command-output-in-response": true,

View File

@@ -0,0 +1,15 @@
#!/bin/sh
# TODO the systemd unit should actually do this
# touch /maintenance/maintenance.on
# rm /maintenance/maintenance.on
# for instance-control docker compose setup:
# make a directory in /tmp for these pipes and mount that as a volume
# into the container
# TODO read 'version' arg from request and make sure it
# matches the version of this script
# use a named pipe
printf "%s\t%s\t%s\t%s\n" "$HOOK_tag" "$HOOK_request_id" "$HOOK_path" "false" > /tmp/restic/snapshot_trigger_pipe

View File

@@ -12,4 +12,4 @@
# matches the version of this script
# use a named pipe
printf "%s\t%s\t%s\n" "$HOOK_tag" "$HOOK_request_id" "$HOOK_path" > /tmp/restic/snapshot_trigger_pipe
printf "%s\t%s\t%s\t%s\n" "$HOOK_tag" "$HOOK_request_id" "$HOOK_path" "true" > /tmp/restic/snapshot_trigger_pipe