You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This ignores the files with names ending .zip, so we have some old .sql files in that directory (20 of them!) but hundreds of .zip files.
Expected behavior
Zipped SQL files should be limited to the count defined in GeneralConfig::maxBackups, either treating .sql and .zip files as grouped together or as 2 separate groups.
Actual behavior
Only files ending .sql are counted.
Craft CMS version
3 or 4
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered:
Agree this is probably a more desired behavior, but considering you have to explicitly opt into backups being stored as a zip file via the db/backup command, I don’t really consider this a bug. So I’ve made the change for Craft 4.1 instead of the next 4.0.x release (607d1e0).
What happened?
Same issue exists on
4.x
and3.x
.Description
As part of our deployment process we do a database backup command similar to:
This correctly produces a
*.sql.zip
file in thestorage/backups
directory. We also have theGeneralConfig::maxBackups
unset inconfig/general.php
meaning it should be set at it's default of20
: https://craftcms.com/docs/3.x/config/config-settings.html#maxbackups.The code responsible for limiting the number of backup files kept has this line:
cms/src/db/Connection.php
Line 268 in 46bb9ed
This ignores the files with names ending
.zip
, so we have some old.sql
files in that directory (20 of them!) but hundreds of.zip
files.Expected behavior
Zipped SQL files should be limited to the count defined in
GeneralConfig::maxBackups
, either treating.sql
and.zip
files as grouped together or as 2 separate groups.Actual behavior
Only files ending
.sql
are counted.Craft CMS version
3 or 4
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered: