borgmatic restore/extract fails in Ubuntu 18.04 with remote repository over SSH setup #243
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#243
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
Running the following commands in the sequence:
I am trying out the borg/borgmatic before deploying it in our org.
Steps to reproduce (if a bug)
The setup requires vagrant with virtualbox installed as well as vagrant-vbguest (see README.md in the repository):
Actual behavior (if a bug)
The restore does not work, throws the following error:
Expected behavior (if a bug)
Restore works as expected.
Other notes / implementation ideas
I can execute extract using borg without any problems:
Environment
borgmatic version: 1.4.8
Use
sudo borgmatic --version
orsudo pip show borgmatic | grep ^Version
borgmatic installation method: installed with pip3
Borg version: 1.1.10
Use
sudo borg --version
Python version: 3.6.8
Use
python3 --version
operating system and version: Ubuntu 18.04
Ok, I found the problem. in
borg/extract.py
on line 85:In debugger:
The defaul behaviour of abspath is exactly how it goes here:
It basically appends my cwd to the repository, which makes it inoperable.
After removing os.path.abspath, I am still running into the issue with PostgreSQL:
I am not trying to backup any PostgreSQL DBs (yet), what is it trying to do here? oO
I commented out the line responsible for inclusion patterns:
And now have this error:
I will try to use borgmatic version prior to PostgreSQL update --> 1.3.26
There is no
restore
in 1.3.26, butextract
command works as expected -- i.e.os.path.abspath
is not there yet.Thank you so much for the detailed bug report. I'll have to dig into this. However, some initial reactions off the bat:
abspath()
is indeed a problem here, and never should have been used on a repository because, as you discovered, it breaks if the repository is remote.borgmatic extract
is for extracting files from an archive, andborgmatic restore
is for restoring databases! So what it's trying to do here is look for database dump files in your archive and restore them. If there's any way I can make that clearer in the docs or help, please let me know.Fixed in borgmatic 1.4.9, just released. Thanks again for reporting, and please let me know whether or not this fix works for you!
@witten, thanks for the quick fix!
I don't think improving the docs are necessary, I was just surprised by the command behaviour. It works as expected now:
restore
simply does nothing as I don't have any databases configured there.Cool, glad to hear it's working!
You should be aware of this related bug, as you may have experienced it: #246.