craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.29k stars 638 forks source link

Config setting to limit the number of database backups Craft creates #2078

Closed angrybrad closed 5 years ago

angrybrad commented 7 years ago

There should be a config setting to limit the number of database backups that Craft creates by default in craft/storage/backups if no backupCommand config setting is set. You should be able to set it to false to have unlimited backups, but if it were set to a number, then that folder is checked before a backup is created and the oldest are deleted.

arcustech commented 7 years ago

As we have had a few clients caught by this to different degrees including someone with an automated process that caused a backup every 5 minutes and in fairly short order consumed 40+GB of backup space. Maybe a default value of the last 25?

ostark commented 6 years ago

@angrybrad @arcustech I do have a client with a "backups every 5 minutes" pattern, resulting in 40+GB / 8K files so far. Where does it come from?

angrybrad commented 6 years ago

@ostark i assume it's coming from your every 5 minute backup? :) This issue is for a FR that would allow Craft to delete files over X days old, but you could setup a cron job to do something similar in the meantime.

ostark commented 6 years ago

I didn't know it is possible to trigger backups via http.

angrybrad commented 6 years ago

Sorry, I must be misunderstanding. What's the issue you're seeing?

ostark commented 6 years ago

@angrybrad @arcustech I guess FeedMe (Craft2) is the culprit https://github.com/verbb/feed-me/blob/craft-2/feedme/services/FeedMe_ProcessService.php#L324