Copr doesn't have proper backup in fedora-infra, I would like to fix this problem.
Targets:
copr-fe.cloud.fedoraproject.org :: PostgreSQL database for frontend, db name: "coprdb"
copr-be.cloud.fedoraproject.org :: File tree with built packages: "/var/lib/copr/public_html/results/"
Can you create and setup in ansible and on copr-fe a script to dump the database(s) to /backup? Then we can backup that dir. Our backup solution doesn't have any native db handling, so we just backup dumps so we know they are consistent, etc.
I've started an initial backup of copr-be... might take a few days to get the initial data. Once thats done I will add it to the regular nightly backups.
copr-be is finished it's initial backup.
I've added it to daily backups.
FYI, this is what I had to set up backups:
rsync -avrz --del root@copr-be.cloud.fedoraproject.org:/var/lib/copr/public_html/results/ /mnt/coprbackup/results/ mv /mnt/coprbackup/coprdb.pg_dump /mnt/coprbackup/coprdb.pg_dump.prev && ssh root@copr-fe.cloud.fedoraproject.org 'su - postgres -c "/usr/bin/pg_dump --blobs --clean -Fc -v -Z7 coprdb"' > /mnt/coprbackup/coprdb.pg_dump
I've added a postgresql backup dir/script/cron we use on our other db hosts.
However, whats the status of the role based copr playbooks? ie, copr-frontend/copr-backend? I see they just refer to copr-dev at this point...
Once those are set to run on the prod instances the db backups should start happening and I can add them to the backup host.
Hi kevin, thanks for backup!
offtopic about role playbooks:
they are mainly done both for production and stg, i have commented out production host with aim to test them only on stg instance, but failed to do it, since (here I assume) this new don't have acls in rbac-playbook.
I hope to return to this task in a few days ( right now I'm on business trip ).
ok. Yes, it's hard coded into the rbac-playbook.
Let me know if you need that adjusted for new names.
Thanks.
Where are we here?
ready to switch to the role based playbooks?
This is now done. I added copr-fe to backups and did a initial run of them. They should run every day now.