How to ensure only one local backup is kept by a frappe site

You might have noticed that even when you set a frappe site to keep 1 backup in System Settings, that 2 are kept. There is a quick fix for this.

 · 1 min read

There is a bug in frappe which means the number of local backups kept are not the same as the number you set.


In common_site_config.json you should set the following entry:


"keep_backups_for_hours": 23,


By default this is set to 24 but there is a race condition between daily backups which often means yesterday's backup remains behind.


The bug has been reported here.