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

fixes #17474 Postgres restore task now cleans the db prior to import. #4046

Merged
merged 1 commit into from Nov 25, 2016

Conversation

ohadlevy
Copy link
Member

No description provided.

@mention-bot
Copy link

@ohadlevy, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ares, @dLobatog and @domcleal to be potential reviewers.

when using postgres as a database, and restoring and
existing db dump, clean the target database prior to restore.

this allow the usage case when installing a new server,
running foreman-installer and then restoring the database.
@dLobatog
Copy link
Member

When I wrote the task, I did not run foreman installer, I was under the assumption that one would restore the db manually and not rely on foreman-installer to create it first. This will fix it - so 👍

It's dangerous in case you have a existing db and you wipe it by accident with this, so I'll add a confirmation step on a separate PR.

Thanks @ohadlevy

@dLobatog dLobatog merged commit d39ced2 into theforeman:develop Nov 25, 2016
@lzap
Copy link
Member

lzap commented Dec 9, 2016

Today I spent some time with incorrect restore, I highly suggest to add -e (exit on error) there as well.

@ohadlevy
Copy link
Member Author

ohadlevy commented Dec 9, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants