YunoHost-Apps / freshrss_ynh

FreshRSS package for YunoHost
https://freshrss.org
GNU Affero General Public License v3.0
29 stars 20 forks source link

Exclude cached files from backup #64

Open nicofrand opened 5 years ago

nicofrand commented 5 years ago

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 freshrss_ynh backs up files that are useless, specially all the cached files.

Example:

-rw-r--r-- www-data www-data    23937 Sat, 2019-02-02 00:00:05 apps/freshrss/backup/www/data/cache/5998732e7eeb71d624492473d5c86fcc.spc                                                                                                                                        
-rw-r--r-- www-data www-data   330557 Sat, 2019-02-02 00:00:05 apps/freshrss/backup/www/data/cache/5dbc4bf7f4ea25e9cd6722d2288140c3.spc                                                                                                                                        
-rw-r--r-- www-data www-data    18347 Sat, 2019-02-02 00:00:06 apps/freshrss/backup/www/data/cache/edc3fa37213f1d7e45e37ff9e5d0b9aa.spc                                                                                                                                        
-rw-r--r-- www-data www-data    51893 Sat, 2019-02-02 00:00:07 apps/freshrss/backup/www/data/cache/c88001de4cd70d25700054b4a7943ab3.spc                                                                                                                                        
-rw-r--r-- www-data www-data   458001 Sat, 2019-02-02 00:00:07 apps/freshrss/backup/www/data/cache/5ac268f4bc51434edfa327cd60e50665.spc                                                                                                                                        
-rw-r--r-- www-data www-data    53102 Sat, 2019-02-02 00:00:12 apps/freshrss/backup/www/data/cache/6cacb7e447e94c6a56040f3749931278.spc                                                                                                                                        
-rw-r--r-- www-data www-data   167806 Sat, 2019-02-02 00:00:12 apps/freshrss/backup/www/data/cache/bb51dcbf842fe2d5454663b869d7a940.spc                                                                                                                                        
-rw-r--r-- www-data www-data     9159 Sat, 2019-02-02 00:00:12 apps/freshrss/backup/www/data/cache/c8c3edb713691152301fc83680bcc210.spc                                                                                                                                        
-rw-r--r-- www-data www-data    31705 Sat, 2019-02-02 00:00:12 apps/freshrss/backup/www/data/cache/5f1d8ed3ebfa04703b7c8dc9b64ab994.spc                                                                                                                                        
-rw-r--r-- www-data www-data   361544 Sat, 2019-02-02 00:00:15 apps/freshrss/backup/www/data/cache/553bad17fffddbcefdd44bd99fb44b6a.spc                                                                                                                                        
-rw-r--r-- www-data www-data   144283 Sat, 2019-02-02 00:00:15 apps/freshrss/backup/www/data/cache/388bee03c2f9f96236a7d4fd63384dce.spc                                                                                                                                        
-rw-r--r-- www-data www-data    60546 Sat, 2019-02-02 00:00:17 apps/freshrss/backup/www/data/cache/9eb90a158e178bf67cfb79ef89216053.spc                                                                                                                                        
-rw-r--r-- www-data www-data    67811 Sat, 2019-02-02 00:00:18 apps/freshrss/backup/www/data/cache/4a0573b7bbfa9eb2ba04fc2194b32fa9.spc                                                                                                                                        
-rw-r--r-- www-data www-data   975615 Sat, 2019-02-02 00:00:24 apps/freshrss/backup/www/data/cache/bb05b0b2d51a21ad159671e9924e899f.spc                                                                                                                                        
-rw-r--r-- www-data www-data   460510 Sat, 2019-02-02 00:00:26 apps/freshrss/backup/www/data/cache/ec8982fa22041352bd5c887296e461f4.spc                                                                                                                                        
drwxrwxr-x www-data www-data        0 Sat, 2019-01-26 16:03:29 apps/freshrss/backup/www/data/extensions-data                                                                                                                                                                   
-rw-rw-r-- www-data www-data        2 Sat, 2019-01-26 16:03:29 apps/freshrss/backup/www/data/extensions-data/.gitignore                                                                                                                                                        
-rw-rw-r-- www-data www-data      309 Sat, 2019-01-26 16:03:29 apps/freshrss/backup/www/data/extensions-data/index.html                                                                                                                                                        
drwxrwxr-x www-data www-data        0 Wed, 2019-01-30 18:24:07 apps/freshrss/backup/www/data/favicons                                                                                                                                                                          
-rw-rw-r-- www-data www-data       11 Sat, 2019-01-26 16:03:29 apps/freshrss/backup/www/data/favicons/.gitignore                                                                                                                                                               
-rw-rw-r-- www-data www-data      309 Sat, 2019-01-26 16:03:29 apps/freshrss/backup/www/data/favicons/index.html                                                                                                                                                               
-rw-r--r-- www-data www-data       41 Wed, 2019-01-30 17:16:43 apps/freshrss/backup/www/data/favicons/90995ae6.txt                                                                                                                                                             
-rw-r--r-- www-data www-data     1150 Wed, 2019-01-30 18:23:49 apps/freshrss/backup/www/data/favicons/1196e165.ico                                                                                                                                                             
-rw-r--r-- www-data www-data       30 Wed, 2019-01-30 18:09:08 apps/freshrss/backup/www/data/favicons/27b012ec.txt                                                                                                                                                             
-rw-r--r-- www-data www-data       30 Wed, 2019-01-30 18:09:08 apps/freshrss/backup/www/data/favicons/5c46f40c.txt                                                                                                                                                             
-rw-r--r-- www-data www-data       27 Wed, 2019-01-30 18:09:09 apps/freshrss/backup/www/data/favicons/b8530212.txt                                                  

So, would that be possible to exclude the cached files from the backup please?

Alkarex commented 5 years ago

The largest files will probably be the log files

yalh76 commented 2 years ago

Maybe we can empty the cache folder at the beginning of the backup ?

lapineige commented 2 years ago

That is not a great solution as cache will have to be rebuilt… but it's a simple one.

Yet the only big files here are the ones in apps/freshrss/backup/www/data/cache/. Let's just exclude then ?

nicofrand commented 2 years ago

As far as I know there was no way to exclude some folders from the yunohost backup. I wonder if YunoHost core should exclude all cache folders…

Alkarex commented 2 years ago

If that helps, the cache path could be moved to another location. This is done with CACHE_PATH in ./constants.local.php

lapineige commented 2 years ago

What happens if we move it to /tmp ?

yalh76 commented 2 years ago

or move it in a datadir at /home/yunohost.app/$app