PostgreSQL Backup and Restore module

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 -

  1. database name
  2. format(plain, custom)
  3. destination file
  4. owner
  5. host

I can contribute in coding it. Just wanted some feedback.

Thanks.

what about the ability to selectively restore a tablespace/db/table?

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.