Skip to content

update-apps: fix restore path, add PBS support and improve restore messages#12528

Open
omertahaoztop wants to merge 1 commit intocommunity-scripts:mainfrom
omertahaoztop:feat/update-apps-pbs-restore
Open

update-apps: fix restore path, add PBS support and improve restore messages#12528
omertahaoztop wants to merge 1 commit intocommunity-scripts:mainfrom
omertahaoztop:feat/update-apps-pbs-restore

Conversation

@omertahaoztop
Copy link
Contributor

@omertahaoztop omertahaoztop commented Mar 3, 2026

✍️ Description

update-apps.sh restore step was hardcoded to /var/lib/vz/dump/*.tar.zst, which silently fails for PBS and any non-default storage.

Changes:

  • Use pvesm list to dynamically resolve the latest backup from the selected storage — works for both PBS and traditional file-based storages with no extra plumbing
  • Restore log messages now include container ID, exit code, storage name and resolved backup entry

🔗 Related Issue

Fixes #

✅ Prerequisites

  • Self-review completed
  • Tested thoroughly
  • No security risks

🛠️ Type of Change

  • 🐞 Bug fix
  • ✨ New feature
  • 🆕 New script – A fully functional and tested script or script set.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

The restore step was hardcoded to look for a .tar.zst file at
/var/lib/vz/dump/, which does not work for PBS or any non-default
storage.

Replace the hardcoded path with pvesm list to find the latest backup
for the container in the selected storage. This works for all storage
types including PBS (backup/ct/CTID/TIMESTAMP) and traditional file
storages (vzdump-lxc-*.tar.zst) without any extra plumbing.

Also improve log messages in the restore flow to show container ID,
exit code, storage name and resolved backup entry so it is clear what
failed and where the restore is coming from.
@omertahaoztop omertahaoztop requested a review from a team as a code owner March 3, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant