YunoHost-Apps / seafile_ynh

Seafile package for YunoHost
https://seafile.com
MIT License
14 stars 19 forks source link

Mark data folder as "big" when backing up #58

Closed roukydesbois closed 4 years ago

roukydesbois commented 4 years ago

Here would it be possible to add -b to the ynh_backup?

This way, the ynh admin can decide to backup the data folder differently than by copying everything in the tar file (for big libraries, rsync-ing the data folder might be more efficient and take less space).

Thanks for the good work on the app, I'm loving it :)

Josue-T commented 4 years ago

Hello,

Well, I don't really like this option personally in this actual state. I removed this option because, when this option is enabled we need to not remove the data directory when we remove the app. You might say that I just need to don't remove this directory in the remove script, but it's a little bit more complicated because if there a lot of file theses it could be really heavy on the hard drive and there are no official way to clean this.

The other issue with this is that with seafile the integrity between the data in /home/yunohost.app/seafile-data and the database is really important as seafile hash the file name. Here there are also no way to check the integrity at the restoration.

Maybe a way would be to implement a hook when we backup with -b and restore, but it still a work in the core side.

roukydesbois commented 4 years ago

Thanks for your answer, these are very good points. I think we are not on the complete same page with regards to the usage of the -b option: I tend to think that the person setting BACKUP_CORE_ONLY to true knows what s.he is doing, and that it's kind of a "Do not use if you don't understand what you are doing" kind of functionality. But what I understand from your message shows much more care to the yunohost admin than I do ;) I'll probably add the option to the backup script on my install then.