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

Deletion not expected #7

Closed
Klabuser opened this issue Sep 28, 2017 · 1 comment
Closed

Deletion not expected #7

Klabuser opened this issue Sep 28, 2017 · 1 comment

Comments

@Klabuser
Copy link

Hi !

Version : 4.3

I encountered a behaviour I couldn't understand. This is my config file :

[/home/backup/data/mysql/production/scrap/fr/done]
relaxed = yes
include = '*.xbstream'
weekly = 3
monthly = 2
yearly = always
ionice = idle

And this is the behaviour rotate-backups had when launched :

Sep 27 12:04:02 backup-0001 rotate-backups[19632]: INFO Scanning /home/backup/data/mysql/production/scrap/fr/done for backups ..
Sep 27 12:04:02 backup-0001 rotate-backups[19632]: INFO Found 7 timestamped backups in /home/backup/data/mysql/production/scrap/fr/done.
Sep 27 12:04:02 backup-0001 rotate-backups[19632]: INFO Preserving /home/backup/data/mysql/production/scrap/fr/done/2017-01-13:22-24-57.xbstream (matches 'yearly' retention period) ..
Sep 27 12:04:02 backup-0001 rotate-backups[19632]: INFO Deleting /home/backup/data/mysql/production/scrap/fr/done/2017-05-17-mc_log_range ..
Sep 27 12:04:03 backup-0001 rotate-backups[19632]: INFO Deleting /home/backup/data/mysql/production/scrap/fr/done/2017-05-17-mc_log_range.tar.gz ..
Sep 27 12:04:03 backup-0001 rotate-backups[19632]: INFO Preserving /home/backup/data/mysql/production/scrap/fr/done/2017-08-04:04-45-05.xbstream (matches 'monthly' retention period) ..
Sep 27 12:04:03 backup-0001 rotate-backups[19632]: INFO Preserving /home/backup/data/mysql/production/scrap/fr/done/2017-09-09:19-48-41.xbstream (matches 'weekly' and 'monthly' retention periods) ..
Sep 27 12:04:03 backup-0001 rotate-backups[19632]: INFO Preserving /home/backup/data/mysql/production/scrap/fr/done/2017-09-20:07-17-24.xbstream (matches 'weekly' retention period) ..
Sep 27 12:04:03 backup-0001 rotate-backups[19632]: INFO Preserving /home/backup/data/mysql/production/scrap/fr/done/2017-09-27-mc_log_range (matches 'weekly' retention period) ..

The folder 2017-05-17-mc_log_range and the file 2017-05-17-mc_log_range.tar.gz were deleted even if they don't match the pattern '*.xbstream' defined in the config file.

Am I doing something wrong ?

@xolox
Copy link
Owner

xolox commented Apr 26, 2018

Hi @Klabuser and thanks for the feedback. Looking at your configuration file I notice two problems:

  1. It contains the option name include but rotate-backups is expecting include-list instead.
  2. The pattern is quoted in strings but rotate-backups is expecting a literal pattern (without the quotes).

This made me realize that the include-list and exclude-list weren't documented anywhere, so in b150a23 I documented all of the supported configuration file options and their expected values (e.g. that the patterns shouldn't be quoted). This information is now available in the online documentation.

I'm going to close this issue now because the actual include/exclude list processing is working fine, it was just the documentation that was insufficient.

@xolox xolox closed this as completed Apr 26, 2018
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

2 participants