-
Notifications
You must be signed in to change notification settings - Fork 25
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
Refactor backups & add backups monitoring #216
base: master
Are you sure you want to change the base?
Conversation
4ba1bc4
to
ba8efc1
Compare
ba8efc1
to
53b0c7c
Compare
if last_backup: | ||
last_backup_time.set(last_backup.created_at.timestamp()) | ||
log.debug("Checking newest backup", last_backup=last_backup) | ||
is_operational = manager.check_is_operational(last_backup) |
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.
opinion: checking if a backup is operational every time we update metrics is a bit too much I think, specially when using b2. We are creating new backups every 24 hours, but checking them every 10 minutes.
{{cookiecutter.repostory_name}}/backups/bin/rotate-local-backups.sh
Outdated
Show resolved
Hide resolved
…ps.sh Co-authored-by: emnoor-reef <[email protected]>
Why not a separate package for this though? |
@olzhasar-reef It's a docker container, idk how to make a package from it. |
Total refactoring of backups.
backups
container is automatically started with everything set up within. One deploys an app, he gets backups working automatically.8000
pg_restore -l
on it and searching forTABLE DATA public django_migrations
in the output. It's dumb but better than nothing for now. For backups in b2, we download only first 10MiB of data, and run the above command on that chunk - so that we don't download the whole large backup. It seems to be enough to read the ToC of postgres archive (I checked manually).with_backups=True
) and Grafana: