I’ve setup cron for my Grav site and cache-clear
and default-site-backup
are running. However, it does not cleanup old backups. Max retention time is set to 7 days.
purge:
trigger: time
max_backups_count: 25
max_backups_space: 5
max_backups_time: 7
profiles:
-
name: 'Default Site Backup'
root: /
exclude_paths: "/backup\n/cache\n/images\n/logs\n/tmp"
exclude_files: ".DS_Store\n.git\n.svn\n.hg\n.idea\n.vscode\nnode_modules"
schedule: true
schedule_at: '0 3 * * *'
The following crons are enabled in /var/www/www.example.com/user/config
:
status:
logrotate-grav: enabled
delete-email-data: enabled
cache-purge: enabled
cache-clear: enabled
default-site-backup: enabled
custom_jobs:
logrotate-grav:
command: /usr/sbin/logrotate
args: '--verbose --state=/var/www/www.example.com/logrotate.status /var/www/www.example.com/logrotate.d/grav'
at: '0 1 * * *'
output: logs/logrotate-grav.log
output_mode: overwrite
email: null
delete-email-data:
command: /usr/bin/find
args: '/var/www/www.example.com/user/data/contact/ -mtime +90 -delete -print'
at: '5 4 * * *'
output: logs/delete-email-data.log
output_mode: overwrite
email: null
However, I also have configs in /var/www/www.example.com/user/www.example.com/config
. In there it contains a different config. For example, the 7 day purge is not enabled there. Should I remove that subfolder because it overrides the configs set in the Grav admin panel? For some reason the admin panel does not change those values. I did not create this directory (on purpose).