Exclude cached files from backup
nicofrand opened this issue · comments
Hi,
I am currently using borg_ynh to backup my YunoHost on a 3rd party server, which is really nice.
However the more space I use, the more I pay. The issue is that wallabag2_ynh backs up files that are useless, specially all the cached files.
Example:
drwxr-xr-x wallabag2 wallabag2 0 Sun, 2018-12-30 12:18:20 apps/wallabag2/backup/var/www/wallabag2/var/cache/prod/twig/32
-rw-r--r-- wallabag2 wallabag2 2229 Sun, 2018-12-30 12:18:20 apps/wallabag2/backup/var/www/wallabag2/var/cache/prod/twig/32/32c545867c6904ee61e15dbe457151b311f2862c6995302ab0a1eac93c42d2bf.php
drwxr-xr-x wallabag2 wallabag2 0 Sun, 2018-12-30 12:18:20 apps/wallabag2/backup/var/www/wallabag2/var/cache/prod/twig/85
-rw-r--r-- wallabag2 wallabag2 4570 Sun, 2018-12-30 12:18:20 apps/wallabag2/backup/var/www/wallabag2/var/cache/prod/twig/85/85ccc2312970912665200aa2473f0885c695d34995607121b2c5644d7b21b8b4.php
drwxr-xr-x wallabag2 wallabag2 0 Sun, 2018-12-30 12:18:20 apps/wallabag2/backup/var/www/wallabag2/var/cache/prod/twig/6b
-rw-r--r-- wallabag2 wallabag2 1950 Sun, 2018-12-30 12:18:20 apps/wallabag2/backup/var/www/wallabag2/var/cache/prod/twig/6b/6bde35f741d3b0bb6bbdd96abc0be3058d8c934e808e903364eb9b3391be0bdf.php
I am not sure the vendors files should be backed up too?
So, would that be possible to exclude the cached files from the backup please?
@JimboJoe @maniackcrudelis do you know if we can exclude some path with ynh_backup
helper ? (https://github.com/YunoHost-Apps/wallabag2_ynh/blob/master/scripts/backup#L35)
No this helper doesn't provide such feature.
But you can clear the cache before the backup
https://github.com/YunoHost-Apps/agendav_ynh/blob/package_upgrade/scripts/backup#L38-L42
Merged in testing, soon in master.