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

postgresql_db: add support for directory format #108

Merged

Conversation

Andersson007
Copy link
Collaborator

@Andersson007 Andersson007 commented Jun 22, 2021

SUMMARY

postgresql_db: add support for directory format

Fixes #83

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

postgresql_db

@Andersson007
Copy link
Collaborator Author

cc @tcraxs @kostiantyn-nemchenko

@Andersson007
Copy link
Collaborator Author

cc @andytom @landryb

@landryb
Copy link

landryb commented Jun 28, 2021

i've manually backported the bits added to the 2.7.7+dfsg-1 version i'm using here, and successfully tested a dump/restore via a directory using this snippet:

- name: sync databases
  hosts: db
  tasks:
  - name: dump db
    postgresql_db:
      login_password: "{{ postgresql_roles['root']['pass'] }}"
      name: dict_reseaux
      state: dump
      target: /tmp/dict_reseaux.dir

  - name: restore db
    postgresql_db:
      login_password: "{{ postgresql_roles['root']['pass'] }}"
      name: dict_reseaux
      state: restore
      target: /tmp/dict_reseaux.dir
      target_opts: --clean --if-exists

thanks !!

@Andersson007
Copy link
Collaborator Author

@landryb thanks for testing!

@Andersson007
Copy link
Collaborator Author

Do other contributors / maintainers have any ideas?

Copy link
Contributor

@tcraxs tcraxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Andersson007
Copy link
Collaborator Author

@landryb @tcraxs thanks for reviewing!

@Andersson007 Andersson007 merged commit 1f237e9 into ansible-collections:main Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support to restore from directory formats
3 participants