-
Notifications
You must be signed in to change notification settings - Fork 185
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
Add backup and restore with pg_dumpall #38
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR! I hope to take a closer look and test later this week. One minor reservation I have is that, best I can tell, pg_dumpall does not compress the archive? Can you confirm, and/or do you see a way to enable compression? We use |
As you pointed out, pg_dumpall still doesn't have the compression function built in, but I can implement it using gzip as a way around the lack of that function for now |
OK, great, please do! |
Done, I added compression using gzip |
Thank you! I do intend to merge this, but I'm afraid it might be a bit (a few weeks perhaps) before I get to it. There are many combos of options to test, especially now with |
Wow, iam doing apps with database-per-tenant and this is what I am missing! Btw Iam already user of this tool |
@eeshugerman anything we can do to help push this forward? |
-p $POSTGRES_PORT \ | ||
-U $POSTGRES_USER \ | ||
$PGDUMP_EXTRA_OPTS \ | ||
> db.dump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we want to pipe directly to gzip here?
| gzip > db.dump.gz
Hello, This project has helped me a lot!
In my environments I need to back up more than one database. But there is no possibility to use
pg_dumpall
so I decided to implement it.I added a new variable
BACKUP_ALL
to switch betweenpg_dump
andpg_dumpall
. I also made the variablePOSTGRES_DATABASE
optional ifBACKUP_ALL
is true. And I added the option to restore the backup containing all banksThank you very much for this project and I hope this PR can help to improve even more