TODO.md records that the off-host copy of the access log "describes a design rather than a fact", and that the pull is two rsync lines the maintainer adds on the backup host. Those lines are now written, tested against the live VPS, and not installed — every install step needs root.
This is host tooling rather than repo content, so nothing here is a change to this repository. It is filed here because this repo is what depends on it: OPERATIONS.md "Log Review" is unrunnable past the VPS's retention window until it lands.
What exists now
/usr/local/bin/vps-backup-pull on Proxmox already pulls the encrypted archives and the plaintext host config, and is already parameterised by VPS_HOST, DEST, REMOTE_ARCHIVE_DIR and SSH_OPTS. It has no log leg and no schedule.
A patched copy adds the log leg in the same style, with both ends as environment variables:
| Variable |
Default |
What |
REMOTE_TRAEFIK_LOG_DIR |
/var/log/traefik/archive |
rotated edge access logs, on the VPS |
REMOTE_BLOG_LOG_DIR |
/var/log/blog/legacy |
one-off Caddy container dumps, on the VPS |
LOG_DEST |
/data/backup/vps-logs |
where both land, on Proxmox |
Plus a --no-logs flag mirroring the existing --no-hostconfig, and a systemd service and timer for the schedule that has never existed.
Verified by running it: 35/35 archives checksum-verified, 33 host config files, 4 log files landed. bash -n clean, and shellcheck reports only the two informational findings the original already had.
Three decisions, each commented at its point in the script
--delete never reaches the log leg, whatever is passed. The VPS prunes at 400 days by design and this host is the copy that outlives it, so mirroring that prune would delete the only remaining copy at exactly the moment it became the only one.
- Today's live
access.log is not fetched. It is still being appended to, so a copy is a torn prefix the next run refetches; rotation at 00:00 UTC is what makes a file eligible. Read the live file over SSH when analysing today.
LOG_DEST is separate from DEST, and mode 700. Query strings are logged in full, so the tree is as sensitive as the log, and its retention requirement is the opposite of the archives'.
The timer runs 09:00 UTC daily, behind both producers on the VPS rather than beside them: logrotate rotates at 00:00 UTC and pangolin-backup.timer writes the day's archive at 08:03 UTC. Pulling before the archive exists fetches yesterday's and reports success, which is the failure that looks like a working backup. Persistent=true covers a host that was off.
What is left, and who has to do it
- Install — needs root: the script to
/usr/local/bin/, the two units to /etc/systemd/system/, then systemctl enable --now vps-backup-pull.timer.
- Send the change back to the VPS. The script's own header says the canonical copy lives on the VPS at
/usr/local/share/pangolin-maint/vps-pull.sh and that the Proxmox copy is deployed from there, so a change made only on Proxmox is reverted by the next deploy of that header's scp. Better routed through the VPS agent, which owns that file.
- Decide who prunes the local archive set.
--delete is deliberately absent from the unit, so the Proxmox copy grows past the VPS's 14-archive window — it is already 38 here against 35 there. That is the copy doing its job rather than drift, but nothing prunes it and it has no owner.
Until step 1 lands, the 400 days on the VPS remain the only copy of the access log, and anything built on that log should say so.
TODO.mdrecords that the off-host copy of the access log "describes a design rather than a fact", and that the pull is two rsync lines the maintainer adds on the backup host. Those lines are now written, tested against the live VPS, and not installed — every install step needs root.This is host tooling rather than repo content, so nothing here is a change to this repository. It is filed here because this repo is what depends on it:
OPERATIONS.md"Log Review" is unrunnable past the VPS's retention window until it lands.What exists now
/usr/local/bin/vps-backup-pullon Proxmox already pulls the encrypted archives and the plaintext host config, and is already parameterised byVPS_HOST,DEST,REMOTE_ARCHIVE_DIRandSSH_OPTS. It has no log leg and no schedule.A patched copy adds the log leg in the same style, with both ends as environment variables:
REMOTE_TRAEFIK_LOG_DIR/var/log/traefik/archiveREMOTE_BLOG_LOG_DIR/var/log/blog/legacyLOG_DEST/data/backup/vps-logsPlus a
--no-logsflag mirroring the existing--no-hostconfig, and asystemdservice and timer for the schedule that has never existed.Verified by running it: 35/35 archives checksum-verified, 33 host config files, 4 log files landed.
bash -nclean, andshellcheckreports only the two informational findings the original already had.Three decisions, each commented at its point in the script
--deletenever reaches the log leg, whatever is passed. The VPS prunes at 400 days by design and this host is the copy that outlives it, so mirroring that prune would delete the only remaining copy at exactly the moment it became the only one.access.logis not fetched. It is still being appended to, so a copy is a torn prefix the next run refetches; rotation at 00:00 UTC is what makes a file eligible. Read the live file over SSH when analysing today.LOG_DESTis separate fromDEST, and mode 700. Query strings are logged in full, so the tree is as sensitive as the log, and its retention requirement is the opposite of the archives'.The timer runs 09:00 UTC daily, behind both producers on the VPS rather than beside them: logrotate rotates at 00:00 UTC and
pangolin-backup.timerwrites the day's archive at 08:03 UTC. Pulling before the archive exists fetches yesterday's and reports success, which is the failure that looks like a working backup.Persistent=truecovers a host that was off.What is left, and who has to do it
/usr/local/bin/, the two units to/etc/systemd/system/, thensystemctl enable --now vps-backup-pull.timer./usr/local/share/pangolin-maint/vps-pull.shand that the Proxmox copy is deployed from there, so a change made only on Proxmox is reverted by the next deploy of that header'sscp. Better routed through the VPS agent, which owns that file.--deleteis deliberately absent from the unit, so the Proxmox copy grows past the VPS's 14-archive window — it is already 38 here against 35 there. That is the copy doing its job rather than drift, but nothing prunes it and it has no owner.Until step 1 lands, the 400 days on the VPS remain the only copy of the access log, and anything built on that log should say so.