Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

barman-cloud-backup Does not preserve pg_wal folder if it is a symbolic link / barman-wal-restore does not create empty pg_wal folder #327

Closed
bonesmoses opened this issue Mar 4, 2021 · 6 comments
Assignees
Labels
Milestone

Comments

@bonesmoses
Copy link

The barman-cloud-backup utility does not preserve the pg_wal / pg_xlog folder when storing cloud objects, if the folder is a symbolic link. This is a fairly common configuration in Postgres clusters, and causes barman-cloud-restore to fail when attempting to restore WAL files, as the directory does not exist.

While it is understandable for barman-cloud-backup not to follow symbolic links, it should either create an empty stub folder in the backup if such a link exists, or barman-cloud-restore should ensure a pg_wal / pg_xlog folder exists for restored WAL files to reside in. If one was not restored from the backup itself, Barman should create it.

@Kamal-Villupuram
Copy link

Any update on this issue?

@amenonsen
Copy link
Contributor

I have a fix for this, which will be included in the 2.13 release.

@Kamalbharath
Copy link

Thanks for the update. when 2.13 will be released?

@amenonsen
Copy link
Contributor

Next week.

@Kamalbharath
Copy link

Thanks. We opended also at the same time for same kind link issue. is this covered on this release?
#325

@amenonsen
Copy link
Contributor

Thanks. We opended also at the same time for same kind link issue. is this covered on this release?
#325

Yes, it's WIP.

amenonsen added a commit that referenced this issue Jul 21, 2021
If you run barman-cloud-backup on a data directory where pg_wal is a
symlink, it doesn't include pg_wal in the uploaded tar files, and the
pg_wal directory will not be created if you restore the backup.

We fix this by creating pg_wal in the destination directory if it does
not exist at the end of the backup.

Closes #327
amenonsen added a commit that referenced this issue Jul 23, 2021
If you run barman-cloud-backup on a data directory where pg_wal is a
symlink, it doesn't include pg_wal in the uploaded tar files, and the
pg_wal directory will not be created if you restore the backup.

We fix this by creating pg_wal (or pg_xlog, depending on the version) in
the destination directory if it does not exist at the end of the backup.

Closes #327
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants