From c5660fc2f031a74cbdc14518f296f91822ed52c3 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Wed, 22 Jul 2026 22:06:30 +0200 Subject: Fix pve-lxc start and add missing docs about backup --- roles/backup/README.md | 25 +++++++++++++++++++++++++ roles/pve-lxc/tasks/main.yml | 1 + 2 files changed, 26 insertions(+) (limited to 'roles') diff --git a/roles/backup/README.md b/roles/backup/README.md index 88bdf7d4..63c14fff 100644 --- a/roles/backup/README.md +++ b/roles/backup/README.md @@ -75,6 +75,31 @@ and can restore a snapshot back on demand. run), `restic backup `, then `restic forget --prune` using the configured retention. +## Manual Backup + +The scheduled timer/cron just calls the same script deployed to +`/usr/local/bin/{{ backup_name }}-backup` — run it directly to back up on demand: + +```bash +sudo /usr/local/bin/{{ backup_name }}-backup +``` + +To verify the snapshot landed, via restic: + +```bash +source /etc/credstore/{{ backup_name }}-backup.env +export RESTIC_REPOSITORY="$BACKUP_REPO" RESTIC_PASSWORD="$BACKUP_PASSWORD" \ + AWS_ACCESS_KEY_ID="$BACKUP_ACCESS_KEY_ID" AWS_SECRET_ACCESS_KEY="$BACKUP_SECRET_ACCESS_KEY" +restic --cache-dir "/var/cache/{{ backup_name }}-backup" snapshots +``` + +Or via the S3 backend directly, from a host with `awscli` configured against it — +restic prefixes every job's objects under `{{ backup_name }}` within the bucket: + +```bash +aws s3 ls s3:///{{ backup_name }}/ --recursive +``` + ## Restore Process Restore never runs automatically — every restore-related task is tagged diff --git a/roles/pve-lxc/tasks/main.yml b/roles/pve-lxc/tasks/main.yml index 12a2e814..c7c2962e 100644 --- a/roles/pve-lxc/tasks/main.yml +++ b/roles/pve-lxc/tasks/main.yml @@ -47,6 +47,7 @@ validate_certs: false node: "{{ ansible_facts['hostname'] }}" vmid: "{{ pve_lxc_id }}" + hostname: "{{ pve_lxc_hostname }}" state: started tags: # PVE API not available in containers — requires proxmox-ve package -- cgit v1.2.3