While working on setting up our database with Ansible I felt the need of these 2 modules. As suggested by @abadger1 I want to discuss if anybody thinks it’s worth it. For now I’m just using command module to run pg_dump and pg_restore. Postgres_backup/restore modules can use these commands underneath with options -
database name
format(plain, custom)
destination file
owner
host
I can contribute in coding it. Just wanted some feedback.
what about the ability to selectively restore a tablespace/db/table?
Yes. It’s also possible to selectively backup and restore tables/namespace only. We can make it a part of the same module. If we use pg_dump underneath, tables can be selected using wildcard too.
Depends how mainstream it would be, and how many people could use the implementation, about whether it’s a good fit for core, ultimately.
I am conceptually interested but normally would just shell out to postgresql commands, and generally we do push back on modules that are simple command wrappers.