PostgreSQL directory format dump not supported anymore #314
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#314
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?
Trying to perform a directory format dump with PostgreSQL
This used to be supported, and is very useful to avoid bloating a repository since in a directory backup, many files will not change from one backup to the next. This allows for a better reuse of chunks.
Steps to reproduce (if a bug)
Use the following configuration to dump the database:
postgresql_databases:
- name: mydb
format: directory
options: --compress 0
Actual behavior (if a bug)
The french pg_dump error says "no target directory given"
Expected behavior (if a bug)
The dump should be performed in a (temp-ish) directory, then backed up
Other notes / implementation ideas
I think we should special case the directory format, since it can't redirect it's output to stdout.
Environment
borgmatic version: 1.5.4
borgmatic installation method: Archlinux package
Borg version: borg 1.1.11
Python version: Python 3.8.2
Database version (if applicable): PostgreSQL 12.3
operating system and version: Arch Linux
Thank you for bringing this to my attention! I obviously overlooked support for this directory format with the most recent release. I'll have a look at the code and see what, if anything, I can do given the new streaming database dump approach.
Okay, I have a fix for this implemented in master, and it'll go out as part of the next release. I'll mention it on this ticket when that happens.
Some details: When the "directory" dump format is selected now, borgmatic does not stream that database to/from Borg for either the dump or the restore. Instead, it writes out the directory dump to a temporary location on disk, and restores from there as well.
I also added a regression test that should catch this sort of issue in the future.
Thanks again for reporting this!
Released in borgmatic 1.5.5!
Thanks !