-
Notifications
You must be signed in to change notification settings - Fork 56
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
Creating a pg_dump for specific tables #122
Comments
Can you provide more detail about your use case? If you're looking to backup a specific schema there is some support for that. As for being selective about the tables being backed up in a given database, you'd have to customize the plugin supporting the database you're using. Plugin scripts can be found in the https://github.com/BCDevOps/backup-container/tree/master/docker folder. I will add a word of caution. I don't think it's a good practice to be selective about what tables are being backed up from a database. This will have unexpected consequences when trying to restore data. The restore process supported by the backup container is a full drop and recreate from backup. |
FYI @WadeBarnes, the use case is that we have a very large table that is simply a copy of data from another system. Because it is a copy, it doesn't need to be backed up. We have this copy for convenience to run reports. Nothing references this table so referential integrity should not be an issue when restoring the backup. |
When you say "very large", how large? Have you tried backing up the database using the backup container and looking at the size of resulting backup to see if the size is an issue? You would have to customize the plugin to support this scenario. You'd have to also customize the restore functionality otherwise the table would be missing from the restored database, but perhaps that's what you're expecting. |
65 GB in online database @WadeBarnes |
I want to exclude specific tables for backup, but backup.conf only accepts the list of databases that are assumed to be valid for the backup and dumps all tables in a DB. I'm wondering where I can modify pg_dump command
The text was updated successfully, but these errors were encountered: