Open yunohost-bot opened 7 years ago
This would be reallllly useful to avoid backuping useless files like logs and cached files.
For example I asked several apps to ignore their cached files in their backup (https://github.com/YunoHost-Apps/rainloop_ynh/issues/51, https://github.com/YunoHost-Apps/freshrss_ynh/issues/64).
My initial issue is that I use borg to backup my YunoHost on a paid server. The more I store the more I pay, and borg cannot deduplicate cached files since they always change.
Adding a way to exclude several paths from a backup would reveal mandatory to fix it on each app level I think.
What would you think of something like ynh_backup path_tobackup --exclude path_to_ignore,other_path
?
There already are several arguments to ynh_backup
so the use of --exclude
might make it more clear?
See https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/filesystem#L13.
May be we should create a helper ynh_backup_exclude to let application decide which dir need to be excluded.
We should check before it's possible with borg, tar and copy to exclude a path.
For now, to bypass this limitation we could do:
yunohost app map
yunohost backup create --debug --apps <copy/pasta from upper results> --system
Original Redmine Issue: 837
Author Name: ljf
It should be possible to specifically exclude a path from a backup.
It could be easy to do if #334 is done correctly.