Re: [Freeze Break Request: ] Switch anitya backups to use --exclude-table-data rather than excluding entire tables
On 10/11/18 9:52 PM, Randy Barlow wrote: > On Wed, 2018-10-10 at 00:17 +, ke...@scrye.com wrote: >> +/usr/bin/pg_dump --exclude-table-data users --exclude-table-data >> tokens --exclude-table-data 'social*' --exclude-table-data sessions >> -C $DB | /usr/bin/pxz -T4 > /backups/$DB-public-$(date +%F).dump.xz > > It might be good to add a comment over this line that explains that > it's excluding the data since it has personally identifiable info, so > that nobody removes it in the future not knowing what it was for. Well, I could, but seems not worth another freeze break. :) I can stash a commit for after freeze. Thanks for the idea. kevin signature.asc Description: OpenPGP digital signature ___ infrastructure mailing list -- infrastructure@lists.fedoraproject.org To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org
Re: [Freeze Break Request: ] Switch anitya backups to use --exclude-table-data rather than excluding entire tables
On Wed, 2018-10-10 at 00:17 +, ke...@scrye.com wrote: > +/usr/bin/pg_dump --exclude-table-data users --exclude-table-data > tokens --exclude-table-data 'social*' --exclude-table-data sessions > -C $DB | /usr/bin/pxz -T4 > /backups/$DB-public-$(date +%F).dump.xz It might be good to add a comment over this line that explains that it's excluding the data since it has personally identifiable info, so that nobody removes it in the future not knowing what it was for. signature.asc Description: This is a digitally signed message part ___ infrastructure mailing list -- infrastructure@lists.fedoraproject.org To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org
Re: [Freeze Break Request: ] Switch anitya backups to use --exclude-table-data rather than excluding entire tables
+1 On 10/10/2018 02:17 AM, ke...@scrye.com wrote: > From: Kevin Fenzi > > This allows people to use the db dump without having to manually create the > missing tables. > > Signed-off-by: Kevin Fenzi > --- > roles/postgresql_server/files/backup-database.anitya | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/roles/postgresql_server/files/backup-database.anitya > b/roles/postgresql_server/files/backup-database.anitya > index c28f31b..a2e05a8 100644 > --- a/roles/postgresql_server/files/backup-database.anitya > +++ b/roles/postgresql_server/files/backup-database.anitya > @@ -10,7 +10,7 @@ DB=anitya > # Make it use a limited number of threads because pxz will use all the > # cpus which causes pg_dump to starve which causes... > > -/usr/bin/pg_dump -T users -T tokens -T 'social*' -T sessions -C $DB | > /usr/bin/pxz -T4 > /backups/$DB-public-$(date +%F).dump.xz > +/usr/bin/pg_dump --exclude-table-data users --exclude-table-data tokens > --exclude-table-data 'social*' --exclude-table-data sessions -C $DB | > /usr/bin/pxz -T4 > /backups/$DB-public-$(date +%F).dump.xz > > # Also, delete the backup from a few days ago. > rm -f /backups/$DB-public-$(date --date="1 days ago" +%F).dump.xz > -- Mikolaj Izdebski Senior Software Engineer, Red Hat IRC: mizdebsk ___ infrastructure mailing list -- infrastructure@lists.fedoraproject.org To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org
Re: [Freeze Break Request: ] Switch anitya backups to use --exclude-table-data rather than excluding entire tables
That looks ok +1 On Tue, 9 Oct 2018 at 20:18, wrote: > > From: Kevin Fenzi > > This allows people to use the db dump without having to manually create the > missing tables. > > Signed-off-by: Kevin Fenzi > --- > roles/postgresql_server/files/backup-database.anitya | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/roles/postgresql_server/files/backup-database.anitya > b/roles/postgresql_server/files/backup-database.anitya > index c28f31b..a2e05a8 100644 > --- a/roles/postgresql_server/files/backup-database.anitya > +++ b/roles/postgresql_server/files/backup-database.anitya > @@ -10,7 +10,7 @@ DB=anitya > # Make it use a limited number of threads because pxz will use all the > # cpus which causes pg_dump to starve which causes... > > -/usr/bin/pg_dump -T users -T tokens -T 'social*' -T sessions -C $DB | > /usr/bin/pxz -T4 > /backups/$DB-public-$(date +%F).dump.xz > +/usr/bin/pg_dump --exclude-table-data users --exclude-table-data tokens > --exclude-table-data 'social*' --exclude-table-data sessions -C $DB | > /usr/bin/pxz -T4 > /backups/$DB-public-$(date +%F).dump.xz > > # Also, delete the backup from a few days ago. > rm -f /backups/$DB-public-$(date --date="1 days ago" +%F).dump.xz > -- > 1.8.3.1 > ___ > infrastructure mailing list -- infrastructure@lists.fedoraproject.org > To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org > Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org -- Stephen J Smoogen. ___ infrastructure mailing list -- infrastructure@lists.fedoraproject.org To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org
[Freeze Break Request: ] Switch anitya backups to use --exclude-table-data rather than excluding entire tables
From: Kevin Fenzi This allows people to use the db dump without having to manually create the missing tables. Signed-off-by: Kevin Fenzi --- roles/postgresql_server/files/backup-database.anitya | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/postgresql_server/files/backup-database.anitya b/roles/postgresql_server/files/backup-database.anitya index c28f31b..a2e05a8 100644 --- a/roles/postgresql_server/files/backup-database.anitya +++ b/roles/postgresql_server/files/backup-database.anitya @@ -10,7 +10,7 @@ DB=anitya # Make it use a limited number of threads because pxz will use all the # cpus which causes pg_dump to starve which causes... -/usr/bin/pg_dump -T users -T tokens -T 'social*' -T sessions -C $DB | /usr/bin/pxz -T4 > /backups/$DB-public-$(date +%F).dump.xz +/usr/bin/pg_dump --exclude-table-data users --exclude-table-data tokens --exclude-table-data 'social*' --exclude-table-data sessions -C $DB | /usr/bin/pxz -T4 > /backups/$DB-public-$(date +%F).dump.xz # Also, delete the backup from a few days ago. rm -f /backups/$DB-public-$(date --date="1 days ago" +%F).dump.xz -- 1.8.3.1 ___ infrastructure mailing list -- infrastructure@lists.fedoraproject.org To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org