Skip to content
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

feat(backup): logs everything to stdout/err, implement lock file for both backup/restore #1023

Merged
merged 14 commits into from
Jun 25, 2024

Conversation

brokenpip3
Copy link
Collaborator

@brokenpip3 brokenpip3 commented Jun 22, 2024

Changes

  • with this changes all the backup components will be log to stdout/err making the flow easy to check and debug:
2024-06-22 17:28:46 - INFO - [run] retaining only the 6 most recent backups, cleanup occurs every 60 seconds
2024-06-22 17:29:47 - INFO - [run] removing backups: 901277.tar.zstd
2024-06-22 17:30:28 - INFO - [restore] no other process are running, restoring
2024-06-22 17:30:28 - INFO - [restore] restore backup with backup number #901283
2024-06-22 17:30:28 - INFO - [restore] Backup file found, proceeding
2024-06-22 17:30:28 - INFO - [restore] restoring 901283 Done
2024-06-22 17:30:34 - INFO - [backup] no other backup process are running
2024-06-22 17:30:34 - INFO - [backup] running backup 901284
2024-06-22 17:30:35 - INFO - [backup] backup 901284 was completed without warnings
2024-06-22 17:30:35 - INFO - [backup] cleaning /backup/tmp.8lKrESTSPY and trap file /backup/_backup_901284_is_running
2024-06-22 17:30:35 - INFO - [backup] 901284 done
  • Implement a lock file for both backup and restore, the script will wait (and can be instructed with count and time) if another process is running by checking the lock file.

  • Several small cosmetic changes

  • Add docs

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS.

@brokenpip3 brokenpip3 changed the title feat(backup): log everything to stdout/err, implement lock file for both backup/restore feat(backup): logs everything to stdout/err, implement lock file for both backup/restore Jun 22, 2024
@brokenpip3 brokenpip3 marked this pull request as ready for review June 22, 2024 15:24
@brokenpip3 brokenpip3 merged commit b722ef1 into master Jun 25, 2024
20 of 21 checks passed
@brokenpip3 brokenpip3 deleted the backup-restore-fix-operator-crash branch June 25, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant