stashed / project

Enhancements & Issues
7 stars 2 forks source link

PostgreSQL support taking backup of multiple database using pg_dump instead of pg_dumpall #19

Open hossainemruz opened 3 years ago

hossainemruz commented 3 years ago

Possible Solution

During Backup Pipe the output of multiple pg_dump to a tar process. Then, pipe the output of tar process to restic.

During Restore Pipe the output of restic restore into a tar process that will split the stream on their own files. Then, pipe the output streams into multiple pg_restore command.

Meeting recording: https://youtu.be/s0G3XXfupIU

hossainemruz commented 3 years ago

Possible solution 2

During Backup:

  1. Start a channel and pipe the output from the channel to restic.
  2. Run pg_dump for each databases and pipe the output to the channel.
  3. Once, all the database backup completed, close the channel.

During Restore:

  1. List the available file in the snapshot (each database should be a separate file).
  2. Then, for each backup file, restore and pipe the output of restic to pg_restore