Add pve-backup-watch 0.0.1
A Go CLI that waits for a Proxmox VE vzdump backup to finish and then restarts the guest. - Take one or more VMIDs and poll the node's vzdump tasks via pvesh - Handle QEMU VMs (qm) and LXC containers (pct): unlock, graceful shutdown with forced stop after 120s, then start - Restart after any result by default; -only-failed restarts only when the backup did not finish OK, and -warn-ok treats warnings as success - Ignore backups that finished before the tool started - Add -dry-run, -timeout, -interval and -node options - Exit with 0, 1 (failure or timeout) or 2 (usage error) - Embed version, commit and build date via ldflags (VERSION file, Makefile) - Add README and CHANGELOG
This commit is contained in:
1 parent
b08ce4b8d0
commit
9461ea94a2
6 files changed
+450
-2
No files matched your search
@@ -0,0 +1,12 @@
|
||||
BINARY := proxmox-backup-watch
|
||||
VERSION := $(shell cat VERSION)
|
||||
COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo none)
|
||||
DATE := $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
LDFLAGS := -s -w -X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.date=$(DATE)
|
||||
|
||||
.PHONY: build clean
|
||||
build:
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -o $(BINARY) .
|
||||
|
||||
clean:
|
||||
rm -f $(BINARY)
|
||||
Reference in new issue
Block a user