YunoHost-Apps / borgserver_ynh

Borg server package for YunoHost
https://www.borgbackup.org/
GNU Affero General Public License v3.0
8 stars 4 forks source link

Allow to customize folder where to store backups. #46

Open eauchat opened 2 years ago

eauchat commented 2 years ago

Now that borg_ynh supports setting up any custom repository, it seems it could be nice if borgserver_ynh does it as well. This patch is not making the repo fully configurable, but allows to modify the hardcoded ~/backup into ~/<anything>.

I wasn't able to test it unfortunately, having a strange Info: WARNING - usermod: group 'ssh.app' does not exist error and the app fails to install, but I don't see how this could be related to the modifications. Also I don't know if passing a sub/folder as repository_folder will work or fail.

This is not designed to allow to choose a folder outside of the user's home, as it would be much more tricky to implement. I added to the README a recommendation for people who have this need to simply use mount --bind /backup/path /home/ssh_user/repository_folder.

eauchat commented 2 years ago

!testme

yunohost-bot commented 2 years ago

Alrighty! Test Badge

alexAubin commented 2 years ago

( LGTM on principle but I don't know about all the little technicalities to check :sweat_smile: )

zamentur commented 2 years ago

I am not sure it's relevant to do that. I mean what's the use case ? What the gain to be able to choose the directory ?

eauchat commented 2 years ago

I am not sure it's relevant to do that. I mean what's the use case ? What the gain to be able to choose the directory ?

Apart from the naming flexibility it brings, that some people may appreciate, my personal use case, is to be able to backup multiple different servers into one destination server, without them having to share the same repository, and without having to install multiple time borgserver_ynh thus creating multiple users. One user, multiple borg repositories. I imagined it was a common use case.