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

Rotation policy not work correctly. #17

Open
DenisShalaevSetronica opened this issue Feb 6, 2019 · 2 comments
Open

Rotation policy not work correctly. #17

DenisShalaevSetronica opened this issue Feb 6, 2019 · 2 comments

Comments

@DenisShalaevSetronica
Copy link

root@odoo-backup-1549444260-2jshc:/# pip show rotate-backups
Name: rotate-backups
Version: 4.3
Summary: Simple command line interface for backup rotation
Home-page: https://github.com/xolox/python-rotate-backups
Author: Peter Odding
Author-email: [email protected]
License: UNKNOWN
Location: /usr/local/lib/python3.6/dist-packages
Requires: humanfriendly, naturalsort, six, simpleeval, verboselogs, property-manager, executor, python-dateutil, coloredlogs
Required-by: rotate-backups-s3
root@odoo-backup-1549444260-2jshc:/# date
Wed Feb  6 12:20:42 +03 2019
root@odoo-backup-1549444260-2jshc:/# rotate-backups --dry-run --minutely=5 --hourly=24*4 --daily=7 --weekly=8 --monthly=12 --yearly=3 --include=*.tag --include=*.zip --relaxed ${backups_path}
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups.cli[103] INFO Performing a dry run (because of --dry-run option) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Scanning /backups for backups ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Found 32 timestamped backups in /backups.
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2018-11-20_15-57-53.zip (matches 'hourly', 'weekly', 'monthly' and 'yearly' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2018-11-26_00-47-48.zip (matches 'hourly' and 'weekly' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2018-12-01_00-12-59.zip (matches 'hourly' and 'monthly' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2018-12-12_21-30-46.zip (matches 'hourly' and 'weekly' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2018-12-17_09-40-02.zip (matches 'hourly' and 'weekly' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-01-09_11-57-56.tag (matches 'hourly', 'weekly', 'monthly' and 'yearly' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-01-12_00-53-23.tag (matches 'hourly' and 'daily' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-01-13_01-22-35.tag (matches 'hourly' and 'daily' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-01-14_00-25-51.tag (matches 'hourly', 'daily' and 'weekly' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-01-15_01-01-30.tag (matches 'hourly' and 'daily' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-01-16_00-21-27.tag (matches 'hourly' and 'daily' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-05_13-56-08.tag (matches 'hourly', 'daily', 'weekly' and 'monthly' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-06_00-56-08.tag (matches 'hourly' and 'daily' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-06_01-56-12.tag (matches 'hourly' retention period) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-06_02-56-05.tag (matches 'hourly' retention period) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-06_03-56-08.tag (matches 'hourly' retention period) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-06_04-56-13.tag (matches 'hourly' retention period) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-06_05-56-06.tag (matches 'hourly' retention period) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-06_07-56-13.tag (matches 'hourly' retention period) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Deleting /backups/odoo_devops_2019-02-06_07-56-13.zip ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-06_08-56-07.tag (matches 'hourly' retention period) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Deleting /backups/odoo_devops_2019-02-06_08-56-07.zip ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-06_09-56-11.tag (matches 'minutely' and 'hourly' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Deleting /backups/odoo_devops_2019-02-06_09-56-11.zip ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-06_10-46-05.tag (matches 'minutely' and 'hourly' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Deleting /backups/odoo_devops_2019-02-06_10-46-05.zip ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-06_11-03-07.tag (matches 'minutely' and 'hourly' retention periods) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Deleting /backups/odoo_devops_2019-02-06_11-03-07.zip ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-06_11-37-10.tag (matches 'minutely' retention period) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Deleting /backups/odoo_devops_2019-02-06_11-37-10.zip ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Preserving /backups/odoo_devops_2019-02-06_11-54-10.tag (matches 'minutely' retention period) ..
2019-02-06 12:20:59 odoo-backup-1549444260-2jshc rotate_backups[103] INFO Deleting /backups/odoo_devops_2019-02-06_11-54-10.zip ..

As you can see the *.tag and *.zip files have one rotation policy, but in 2019 year rotated different in fact.

@DenisShalaevSetronica
Copy link
Author

On version 6.0 have same issue.

@DenisShalaevSetronica
Copy link
Author

Using --include={*.zip,*.tag} have some issue.
Using --include="odoo_*" have some issue.

Using separate commands for each --include argument:

rotate-backups ... --include=*.tag ...
rotate-backups ... --include=*.zip ...

it works correctly!

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

No branches or pull requests

1 participant