-
Notifications
You must be signed in to change notification settings - Fork 104
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
Daily rotation not working #43
Comments
Can you please give some more information? For me it's working. So it's the backups of the last 3 days, not the last 3 backups. When I do some backups from today it can happen that the system keeps more than 3 backups. Interesting information would be an Within the script it's a simple |
-r-------- 1 root root 2146709504 Aug 10 01:03 daily_otrs_2020-08-10_01h00m_Monday.sql.gz Shouldn't the one from Monday have been deleted, when the Tuesday backup was created? |
So the rotation mechanism only deletes files when the mysqldump command beforehand was successful. Your dumps are quite different in size, maybe there was a failure in execution. I did a small test:
In automysqldump the find command uses only -mtime without the -daystart parameter. So find should calculate 24h backwards. I don't know when exactly your command was executed, but it looks like it should have deleted the first file due to it was last modified at 01:03 and the second one at 02:06. So the find command to clean it up is executed after the mysqldump. I did it in one of my setups: worked pretty fine. |
You were absolutely right. It ran out of space before it was able to finish! I can confirm that it is actually deleting backups older than these, as I've had it running for about a week now. |
We have the same behaviour, with the setting "CONFIG_rotation_daily=1", which keeps three backup files. A solution can be to change mtime to mmin, like: before: AutoMySQLBackup/automysqlbackup Lines 997 to 999 in 35dfe71
to:
The behaviour should be compatible as far as it goes. If you want, I could create a pull request. |
Hi,
I've set the "CONFIG_rotation_daily" to "1", but backups older than 24 hours are not being deleted.
I installed this on a server with very little space left, so when this feature wasn't working, the hard drive was full within 3 days.
The text was updated successfully, but these errors were encountered: