"borgmatic restore --database all" should error when not actually restoring anything
Closedopened 3 years ago by witten · 2 comments
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
What I'm trying to do and why
I'm trying to restore databases when I don't actually have any databases configured in borgmatic's configuration. A user might do this accidentally, not realizing that the restore they think is happening (because no error) is actually not restoring anything. Unless they look carefully at the output, they may not realize nothing happened.
Steps to reproduce (if a bug)
No databases configured in
test.yaml. Some database dumps in the archive.
Actual behavior (if a bug)
Expected behavior (if a bug)
Other notes / implementation ideas
Would also be good to check what happens when databases are configured, but none are found in the archive.
borgmatic version: 1.4.10.dev0
borgmatic installation method:
pip install --editable
Borg version: 1.1.10
Python version: 3.7.4
Database version (if applicable): PostgreSQL 11.5, MySQL Ver 15.1 Distrib 10.4.8-MariaDB
operating system and version: Manjaro stable
Potential data loss: This is a particularly nasty bug. What happened is that when no databases are configured, no dump patterns get passed to
borg extract, which means borg extracts all files in the archive instead of just database dumps, which means it could extract over your actual non-database files! Super not good. I have a fix in hand, and will release it shortly.
Fix released in borg 1.4.10. Upgrading is highly recommended!