-
Notifications
You must be signed in to change notification settings - Fork 9
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
"dokku psql:dumpall" for backups #17
Comments
I don’t know if it’s the role of the plugin to deal with backups. To backup databases, I’m currently using this little script: #!/bin/bash
BACKUP_DIR=/var/backups/dumps/psql
for raw_db_name in /home/dokku/.psql-sc/db*; do
DB_NAME=$(echo $raw_db_name | sed 's/.*db_//')
echo -n "Dumping $DB_NAME... "
/usr/local/bin/dokku psql:dump $DB_NAME > "$BACKUP_DIR/${DB_NAME}.dump"
echo "done"
done |
Hm, yeah, good question. I would say it's outside the scope of the plugin to actually perform scheduled backups. But explicitly providing a backup story would be nice, to remind plugin users and to save them effort. Your backup script does seem nicer than what I had. Maybe I could make a pull request just adding a README section with that as an example? |
Sure thing, it would be nice :) |
Would be convenient to be able to crontab a single job to back up all databases, so you don't miss it when you add new ones.
There is a
pg_dumpall
– this seems to work:The text was updated successfully, but these errors were encountered: