04 - Operations

Backup and Restore

Purpose

This page documents the backup and restore process for Bytek VMs, LXCs, application data, and configuration.

The current backup system protects against:

The current backup system does not fully protect against:


Backup Storage

Setting Value
Proxmox storage ID pve-backup
Mount point /mnt/pve/pve-backup
Physical disk /dev/sda
Partition /dev/sda1
Filesystem ext4
Approximate capacity 4 TB
Content type VZDump backup files
Mount protection Enabled
Current location Same physical Proxmox server

The backup HDD is dedicated to Proxmox backups.

Do not use the backup HDD for:


Mount Validation

Before relying on a backup job, confirm that the backup HDD is mounted.

Use:

findmnt /mnt/pve/pve-backup

The source should be /dev/sda1.

Check capacity using:

df -h /mnt/pve/pve-backup

Check Proxmox storage state using:

pvesm status

The pve-backup storage must show as active.

Mount-point protection prevents Proxmox from writing backup archives into the empty mount directory on the Proxmox root filesystem if the HDD is unavailable.


Scheduled Backup Policy

Retention Rule Count
Keep last 3
Keep daily 7
Keep weekly 4
Keep monthly 3

Retention must be adjusted if the backup HDD approaches capacity.


Backup Modes

Snapshot Mode

Use snapshot mode for normal scheduled backups when minimizing downtime is important.

Snapshot mode is appropriate for:

Stop Mode

Use stop mode for the strongest whole-VM consistency when brief downtime is acceptable.

Stop mode is recommended for:

Suspend Mode

Suspend mode is not the preferred mode for the current environment.


QEMU Guest Agent

VMs should have the QEMU Guest Agent enabled.

Check a VM configuration using:

qm config <VMID>

The configuration should include the guest agent.

Test guest-agent communication using:

qm guest cmd <VMID> ping

Expected result:

Inside the VM, verify:

systemctl is-active qemu-guest-agent

Expected result:

The guest agent improves guest coordination during snapshot-mode backups.


Disk Inclusion

A VM disk is included in backup by default unless its configuration contains:

backup=0

Review a VM using:

qm config <VMID>

Confirm every required operating-system and application-data disk is included.

For Nextcloud, both of these must be included:

Large replaceable media disks may eventually be excluded, but only after the exclusion is documented and the application configuration remains protected elsewhere.


Service Backup Coverage

Proxmox Host

The normal guest backup job does not back up the Proxmox host operating system.

Preserve separately:

WireGuard Gateway

Protect:

Private keys must remain in encrypted storage, not in BookStack.

Pi-hole

Protect:

A Pi-hole configuration export may supplement the Proxmox backup.

Traefik

Protect:

Never delete acme.json during normal troubleshooting.

Authentik

Protect:

PostgreSQL is the authoritative data source for the Authentik configuration.

Uptime Kuma

Protect:

Nextcloud AIO

Protect:

The AIO Borg repository is currently unconfigured because no separate backup destination is available.

Vikunja

Protect:

BookStack

Protect:

The BookStack application key and database must be restored together.


Application-Level Database Exports

Application-level exports supplement the whole-VM backup.

They do not replace the Proxmox backup.

Vikunja PostgreSQL

Run from /opt/vikunja:

sudo docker compose exec -T db pg_dump -U vikunja vikunja > vikunja-backup.sql

BookStack MariaDB

Run from /opt/bookstack using the database service and credentials defined in the Compose environment.

Prompt for the database password rather than placing the password directly in shell history.

Database exports contain sensitive application data.

Store exports securely and remove obsolete copies.


Manual Baseline Backup

Create a manual backup before:

Example pattern:

vzdump <VMID> --storage pve-backup --mode stop --compress zstd

Confirm the task ends with:

List the backup storage using:

pvesm list pve-backup


Restore-Test Procedure

A backup is not fully trusted until it has been restored and inspected.

  1. Select a recent backup.
  2. Restore to a new VM or LXC ID.
  3. Choose an appropriate target storage.
  4. Disconnect the restored guest network adapter.
  5. Start the restored guest using the Proxmox console.
  6. Confirm the operating system starts.
  7. Confirm expected disks are present.
  8. Confirm expected filesystems are mounted.
  9. Confirm Docker starts.
  10. Confirm application containers exist.
  11. Confirm the database is available.
  12. Confirm persistent application data exists.
  13. Shut down the restored clone.
  14. Delete the test clone after documenting the result.

Do not start a restored clone on the live LAN while the production guest is active.

The clone may contain the same:


Nextcloud Restore Test

For Nextcloud, confirm:

Keep the network adapter disconnected during inspection.


Backup Monitoring

Monitor:

Useful checks:


Backup-HDD Health

Stable device identifier:

/dev/disk/by-id/wwn-0x5000cca097c44d7e

Review:

Pending or uncorrectable sectors require immediate investigation.


Backup Failure Response

If a backup job fails:

  1. Read the Proxmox task log.
  2. Confirm pve-backup is mounted.
  3. Confirm free space.
  4. Confirm the guest exists.
  5. Confirm all required storage is active.
  6. Confirm the QEMU Guest Agent where applicable.
  7. Confirm the VM is not locked.
  8. Confirm no previous backup task is stuck.
  9. Resolve the specific error.
  10. Run a manual test backup.
  11. Confirm TASK OK.
  12. Document the failure and correction.

Do not repeatedly rerun a failing job without reading the task log.


Current Limitations

The current backup architecture has two copies:

  1. Live production data.
  2. Local backup archives on the internal HDD.

Both copies remain:

A future third copy should use:


Validation Checklist


Document Control

Service Startup Order

Purpose

This page documents the preferred startup and validation order after:

Starting services in dependency order reduces DNS, OIDC, proxy, and monitoring failures.


Preferred Startup Order

Order Service
1 Proxmox VE
2 Pi-hole
3 WireGuard Gateway
4 Authentik database and Redis
5 Authentik server and worker
6 Traefik
7 Uptime Kuma
8 Nextcloud AIO
9 Vikunja
10 BookStack
11 Plex, when deployed
12 Game server, when deployed
13 Navidrome, when deployed

1. Proxmox VE

Confirm that the hypervisor completed booting.

Validate:

Useful checks:

Do not start troubleshooting application guests until required Proxmox storage is active.


2. Pi-hole

Pi-hole should start before services that require split DNS.

Validate:

Test:

nslookup portal.bytek.ca 192.168.2.65

Expected result:

Test:

nslookup google.com 192.168.2.65

Expected result:

Containers that started before Pi-hole may need to be restarted after Pi-hole becomes healthy.


3. WireGuard Gateway

Validate:

Useful checks:

The WireGuard tunnel must be working before external application access can recover.


4. Authentik Database and Redis

Authentik depends on PostgreSQL and Redis.

Validate the Authentik Compose stack using:

sudo docker compose ps

Confirm:

Do not treat Authentik as ready merely because the server container has started.


5. Authentik Server and Worker

After PostgreSQL and Redis are healthy, validate:

Direct readiness should return HTTP 200.

The outpost ping should return HTTP 204.

OIDC-dependent applications should not be treated as healthy until Authentik is ready.


6. Traefik

Traefik depends on:

Validate:

Useful checks:

If Traefik started before Pi-hole and DNS remains broken, recreate the Traefik container after Pi-hole is healthy.


7. Uptime Kuma

Start monitoring after DNS, identity, and routing are operational.

Validate:

Do not immediately modify every failed monitor after a reboot. Allow dependencies to recover first.


8. Nextcloud AIO

Before starting the Nextcloud application stack, validate:

Then confirm:

Test:

Do not run Nextcloud normally if the data disk is not mounted.


9. Vikunja

Validate:

If the container cannot reach Authentik, confirm DNS before changing OIDC credentials.


10. BookStack

Validate:

If OIDC fails, temporarily restore standard authentication rather than rebuilding BookStack.


Future Plex Startup

When Plex is deployed, validate:

Do not start Plex if expected media storage is missing.


Future Game-Server Startup

When a game server is deployed, validate:

Do not expose RCON or management ports publicly without additional protection.


Docker DNS Recovery

A recurring risk after a full power loss is that containers start before Pi-hole is ready.

Symptoms include:

Recovery process:

  1. Confirm Pi-hole.
  2. Confirm DNS from the VM host.
  3. Confirm DNS from the affected container.
  4. Check the container’s explicit DNS configuration.
  5. Restart the affected container.
  6. Recreate the container if Docker-level DNS configuration changed.
  7. Retry the failed operation.

Do not regenerate application secrets because of a DNS-only failure.


Full Validation Checklist


Document Control

Disaster Recovery Checklist

Purpose

This checklist provides a concise response plan for major Bytek homelab failures.

The objective is to restore core infrastructure before application services.

Avoid making several unrelated configuration changes simultaneously.


Initial Assessment

Before changing configuration:

  1. Determine whether the problem affects one service or the entire environment.
  2. Check electrical power.
  3. Check the Proxmox host.
  4. Check the home network.
  5. Check internet connectivity.
  6. Check Pi-hole.
  7. Check WireGuard.
  8. Check Traefik.
  9. Check Authentik.
  10. Check application VMs.
  11. Review Uptime Kuma.
  12. Record the observed symptoms.

Do not rely only on browser errors.

Test direct IPs and backend ports where possible.


Complete Proxmox Host Failure

  1. Confirm server power.
  2. Check the physical console.
  3. Confirm the firmware detects all storage devices.
  4. Confirm the Proxmox system NVMe.
  5. Confirm the user-data NVMe.
  6. Confirm the backup HDD.
  7. Attempt normal Proxmox boot.
  8. Review boot messages.
  9. Confirm network bridge configuration.
  10. Confirm pveproxy.
  11. Confirm TCP 8006.
  12. Use root@pam.

If the system NVMe failed:

  1. Replace the failed system storage.
  2. Install Proxmox.
  3. Restore network configuration.
  4. Restore storage configuration.
  5. Reconnect user-data.
  6. Remount pve-backup.
  7. Restore VMs and LXCs.
  8. Verify local authentication.
  9. Restore the Authentik Proxmox realm.
  10. Test OIDC only after local access works.

Pi-hole Failure

  1. Open Proxmox using 192.168.2.254.
  2. Confirm the Pi-hole LXC is running.
  3. Open the LXC console.
  4. Confirm address 192.168.2.65.
  5. Confirm TCP port 53.
  6. Confirm UDP port 53.
  7. Confirm local DNS records.
  8. Confirm public upstream resolution.
  9. Review Pi-hole logs.
  10. Restore from backup if necessary.

During the outage, access services using private IP addresses where supported.

Do not make Pi-hole recovery depend on Authentik.


WireGuard Failure

  1. Confirm the WireGuard gateway guest.
  2. Confirm address 192.168.2.64.
  3. Confirm the WireGuard interface.
  4. Confirm the VPS peer.
  5. Confirm the latest handshake.
  6. Confirm transfer counters.
  7. Confirm IPv4 forwarding.
  8. Confirm firewall rules.
  9. Confirm NAT rules.
  10. Test Traefik connectivity from the tunnel.
  11. Test a public hostname externally.

If the keys are lost or compromised, rotate the affected peer key pair and update the opposite peer.


Public VPS Failure

  1. Open the provider console.
  2. Confirm the VPS is running.
  3. Confirm public IP 38.29.213.101.
  4. Confirm SSH service.
  5. Confirm firewall rules.
  6. Confirm WireGuard.
  7. Confirm TCP 443.
  8. Confirm forwarding to the home tunnel.
  9. Confirm disk space.
  10. Review system logs.

LAN access should continue through Pi-hole and Traefik while the VPS is unavailable.


Traefik Failure

  1. Confirm the Traefik VM owns 192.168.2.182.
  2. Confirm Docker.
  3. Confirm the Traefik container.
  4. Confirm TCP 443.
  5. Confirm container DNS.
  6. Review Traefik logs.
  7. Check recently changed dynamic YAML.
  8. Search for tabs.
  9. Test the direct application backend.
  10. Restore the previous dynamic file if necessary.
  11. Confirm certificate state.
  12. Do not delete acme.json.

If all applications fail simultaneously but direct backends work, prioritize Traefik, Pi-hole, and certificates.


Authentik Failure

  1. Sign into Proxmox using root@pam.
  2. Confirm the Authentik VM owns 192.168.2.162.
  3. Confirm Docker.
  4. Confirm PostgreSQL.
  5. Confirm Redis.
  6. Confirm Authentik server.
  7. Confirm Authentik worker.
  8. Test direct readiness.
  9. Test routed readiness.
  10. Review Authentik logs.
  11. Review Traefik.
  12. Restore Authentik from backup if necessary.

Use application break-glass access during recovery:

Application Recovery Method
Proxmox root@pam
Nextcloud Local administrator
BookStack Switch to standard authentication
Uptime Kuma Restore local authentication
Traefik Basic Auth or restore known-good route

Nextcloud Failure

  1. Confirm VM address 192.168.2.100.
  2. Confirm the 500 GB data disk.
  3. Confirm /mnt/nextcloud-data.
  4. Confirm free disk space.
  5. Confirm Docker.
  6. Open AIO management by private IP.
  7. Confirm PostgreSQL.
  8. Confirm Redis.
  9. Confirm Nextcloud.
  10. Confirm Apache.
  11. Confirm TCP 11000.
  12. Confirm Traefik.
  13. Use the local administrator if OIDC fails.
  14. Restore both virtual disks if recovery is required.

Do not start normal Nextcloud operation if the data mount is missing.


Vikunja Failure

  1. Confirm VM address 192.168.2.121.
  2. Confirm Docker.
  3. Confirm PostgreSQL.
  4. Confirm the Vikunja container.
  5. Confirm TCP 3456.
  6. Test /health.
  7. Run the Vikunja doctor command.
  8. Check attachment permissions.
  9. Check Traefik.
  10. Check Authentik after application health is restored.

BookStack Failure

  1. Confirm the BookStack VM.
  2. Confirm the current private IP.
  3. Confirm Docker.
  4. Confirm MariaDB.
  5. Confirm the BookStack container.
  6. Confirm TCP 6875.
  7. Review the Laravel log.
  8. Confirm APP_URL.
  9. Confirm the application key.
  10. Confirm Traefik.
  11. Switch to standard authentication if OIDC blocks access.
  12. Restore the VM if application data is damaged.

The application key and database must be restored together.


Uptime Kuma Failure

  1. Confirm VM address 192.168.2.115.
  2. Confirm Docker.
  3. Confirm the Uptime Kuma container.
  4. Confirm persistent data.
  5. Confirm embedded database health.
  6. Confirm container DNS.
  7. Test TCP 3001.
  8. Confirm Traefik.
  9. Confirm Authentik Proxy Provider.
  10. Restore local authentication if proxy access fails.

The absence of monitoring does not necessarily mean every monitored system is down.


Backup HDD Failure

  1. Confirm /dev/sda.
  2. Confirm /dev/sda1.
  3. Confirm filesystem UUID.
  4. Confirm /etc/fstab.
  5. Confirm /mnt/pve/pve-backup.
  6. Confirm Proxmox storage state.
  7. Review SMART health.
  8. Stop scheduled backups if the filesystem is unsafe.
  9. Replace the backup HDD if necessary.
  10. Create a fresh backup set immediately after replacement.

Do not allow backups to write into an unmounted directory on the root filesystem.


User-Data NVMe Failure

Expected impact includes Nextcloud user data and any other data disks stored on user-data.

Response:

  1. Stop affected guests.
  2. Avoid further writes.
  3. Confirm the physical NVMe.
  4. Review NVMe health.
  5. Confirm the lvm1 volume group.
  6. Confirm the data thin pool.
  7. Identify the latest valid backups.
  8. Replace the failed storage if required.
  9. Recreate the user-data storage.
  10. Restore affected data disks.
  11. Validate guests offline.
  12. Return services to production.

Authentication Lockout

Proxmox

Use root@pam.

Nextcloud

Use the local administrator and direct local-login path.

BookStack

Set AUTH_METHOD to standard, recreate the BookStack container, and use the local administrator.

Uptime Kuma

Restore the direct Traefik route, allow temporary private access, and re-enable local authentication.

Traefik Dashboard

Restore the previous dashboard YAML or use retained Basic Auth.

Authentik

Use the local Authentik administrator or restore Authentik from backup.


Restore Validation

Before replacing production with a restored guest:

  1. Restore under a temporary guest ID.
  2. Disconnect the network adapter.
  3. Start through the Proxmox console.
  4. Confirm operating-system boot.
  5. Confirm all intended disks.
  6. Confirm mount points.
  7. Confirm Docker.
  8. Confirm database.
  9. Confirm application data.
  10. Confirm configuration and secrets.
  11. Shut down the test clone.
  12. Schedule the production cutover.
  13. Shut down the failed production guest.
  14. Assign the expected network identity to the restored guest.
  15. Start the restored guest.
  16. Test direct backend access.
  17. Test Traefik.
  18. Test Authentik.
  19. Test external access.
  20. Update documentation.

Emergency Credentials

The password manager must contain:

Do not store the actual credential values in BookStack.

BookStack should record only the credential purpose and storage location.


Recovery Priority

Restore services in this order:

  1. Proxmox VE.
  2. Storage pools.
  3. Pi-hole.
  4. WireGuard Gateway.
  5. Authentik database and Authentik.
  6. Traefik.
  7. Uptime Kuma.
  8. Nextcloud.
  9. Vikunja.
  10. BookStack.
  11. Future media and game services.

Incident Record

After a significant incident, record:

Do not include passwords, tokens, private keys, or session cookies.


Final Recovery Checklist


Document Control