Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6815

Automated backup setup not purging old backups

$
0
0
by Daniel Buxton.  

Hey, 

Similar to this issue https://moodle.org/mod/forum/discuss.php?d=454921 - However I am running 4.4.1 (Build: 20240610)

I have found that old backups are not being deleted.  In the GUI I have set the following key config parameters;

Site administration > Courses > Backups > Automated backup setup >
backup | backup_auto_active = ENABLED
backup | backup_auto_storage = Specified directory for automated backups
backup | backup_auto_destination = /custom/dir
backup | backup_auto_max_kept = 1
backup | backup_auto_delete_days = 5 days
backup | backup_auto_min_kept = None
backup | backup_auto_skip_hidden = DISABLED
backup | backup_auto_skip_modif_days = NEVER
backup | backup_auto_skip_modif_prev = DISABLED

I think they key with this issue may be is the storage location is 'Specified directory for automated backups' vs the default 'Course backup filearea'

chown -R www-data:www-data /custom/dir

chmod -R 777 /custom/dir

Even after running 

sudo -su www-data php /srv/www/moodle/admin/cli/cron.php

sudo -su www-data php /srv/www/moodle/admin/cli/scheduled_task.php --execute=\\core\\task\\backup_cleanup_task

sudo -su www-data php /srv/www/moodle/admin/cli/automated_backups.php

No files get deleted

FYI the below command works so I do not believe this is a permissions issue

sudo -su www-data rm /custom/dir/somefile.txt 


Viewing all articles
Browse latest Browse all 6815

Trending Articles