Cannot restore and dump database PostgreSQL with Ansible
The name seems incorrect & the correct code would be as:
- name: import database jira64_20180626.dump.tar.gz postgresql_db: name: name of the db which you want to restore login_user: jira login_password: jira_pwd state: restore target: /TheDUMPfilepath/jira64_20180626.dump.tar.gz
If this is not working The Ansible Doc click here says restore format as below:
The format of the backup will be detected based on the target name.Supported compression formats for dump and restore include .bz2, .gz and .xzSupported formats for dump and restore include .sql and .tar
For example as below:
- name: Dump existing database postgresql_db: name: acme state: dump target: /tmp/acme.sql