Closed eauchat closed 2 months ago
I found an unaddressed forum report about it; https://discourse.getgrav.org/t/how-to-completly-disable-backup/15823/5
Indeed, the output of the scheduler config gives:
# yunohost app shell grav
$ php bin/grav scheduler -j
Scheduler Jobs Listing
======================
┌─────────────────────┬────────────────────────────────────┬───────────┬────────┬──────────┬─────────┐
│ Job ID │ Command │ Run At │ Status │ Last Run │ State │
├─────────────────────┼────────────────────────────────────┼───────────┼────────┼──────────┼─────────┤
│ default-site-backup │ Grav\Common\Backup\Backups::backup │ 0 3 * * * │ Ready │ Never │ Enabled │
│ cache-purge │ Grav\Common\Cache::purgeJob │ 0 4 * * * │ Ready │ Never │ Enabled │
│ cache-clear │ Grav\Common\Cache::clearJob │ 0 3 * * * │ Ready │ Never │ Enabled │
└─────────────────────┴────────────────────────────────────┴───────────┴────────┴──────────┴─────────┘
! [NOTE] For error details run "bin/grav scheduler -d"
Relevant documentation page: https://learn.getgrav.org/16/advanced/scheduler#configuration-file
There is a clear difference between the default admin/config/backups.yaml
and the (initially empty) user/config/backups.yaml
where the config is actually read.
I'll make a PR to fix that.
Thanks a lot @tituspijean for the fast reply, and fix, amazing :) This seems to me like a bug in grav itself, as they're doc explicitly says that if you don't enable backups they should not happen. I'll write an issue about it in their bug tracker to see what they have to say about it.
Fixed by #165
Describe the bug
I've seen this PR proposed but not merged in the end #96. As of today, it seems to me that grav has automatic backup enabled by default. I recently installed various sites, didn't set any
user/config/backup.yaml
file, and all of them have a backup folder filled with daily backups.I'm confused because
system/config/backup.yaml
has the following content:Schedule being set to
false
, I imagine no backup should be going on. Is there something I'm misunderstanding. At this point I'm even wondering if it might be a bug in grav itself. But I feel strange that nobody noticed it yet. Anybody has some ideas of what may be going on?Context
Steps to reproduce
/var/www/grav/backup
Expected behavior
No backup should be automatically made, unless the user creates a
user/config/backups.yaml
file specifying they want backups (or do the same via grav admin).Additional comments
Looking at the backup grav_ynh bacup script, it seems that the whole
/var/www/grav
dir is backed up (if I'm not mistaken readingynh_backup --src_path="$install_dir"
). It seems to me that the/var/www/grav/backup
directory shouldn't be backed up. Otherwise we're backing up the backups, which is a bit weird.