Ravinou / borgwarehouse

A fast and modern WebUI for a BorgBackup's central repository server.
https://borgwarehouse.com
GNU Affero General Public License v3.0
314 stars 22 forks source link

Hetzner StorageBox compatibility #196

Closed Iliannnn closed 2 months ago

Iliannnn commented 3 months ago

Is it possible to add a Hetzner StorageBox as a BorgWarehouse repo? We backup from a Hetzner server to the StorageBox over SSH. You can't run BorgWarehouse natively on the StorageBox because of the limited set of commands:

+-----------------------------------------------------------------------------+
| The following commands are available:                                       |
|   ls                                  list directory content                |
|   tree                                list directory content                |
|   cd                                  change current working directory      |
|   pwd                                 show current working directory        |
|   mkdir                               create new directory                  |
|   rmdir                               delete directory                      |
|   du                                  disk usage of files/directories       |
|   df                                  show disk usage                       |
|   dd                                  read and write files                  |
|   cat                                 output file content                   |
|   touch                               create new file                       |
|   cp                                  copy files/directories                |
|   rm                                  delete files/directories              |
|   unlink                              delete file/directory                 |
|   mv                                  move files/directories                |
|   chmod                               change file/directory permissions     |
|   md5|sha1|sha256|sha512              create hash sum of file               |
|   md5sum|sha1sum|sha256sum|sha512sum  create hash sum of file               |
|   head                                show first lines of file              |
|   tail                                show last lines of file               |
|   grep                                search for specific string in files   |
|   stat                                stat files/directory                  |
|                                                                             |
| Available as server side backend:                                           |
|   borg                                                                      |
|   rsync                                                                     |
|   scp                                                                       |
|   sftp                                                                      |
|   rclone serve restic --stdio                                               |
|                                                                             |
| Please note that this is only a restricted shell which do not               |
| support shell features like redirects or pipes.                             |
|                                                                             |
| You can find more information in our Docs:                                  |
|   https://docs.hetzner.com/robot/storage-box/                               |
+-----------------------------------------------------------------------------+

Is it possible to add an external repo to BorgWarehouse and therefore make this work? Thank you in advance.

Zyztem commented 3 months ago

+1

MilesTEG1 commented 2 months ago

+1

Ravinou commented 2 months ago

Hello. I just got an Hetzner storage box (thanks to @dhenry123 for this sponsoring) and I was able to make backups to this storage very easily.

1- I installed SSHFS (as recommended in the Hetzner documentation) on the machine running my borgwarehouse container. 2- I mounted the directory on the "repo" volumes of the docker container

sshfs myuser@myuser.your-storagebox.de:/Hetzner-BorgWarehouse ~/volumes/repos

3- I restarted the container

Everything's working, I've been able to backup to the Hetzner storage box. I even moved some old repositories and that worked too.

Iliannnn commented 2 months ago

I will try thanks

Ravinou commented 2 months ago

Hmmm, I seem to have a creation error in another context. I'll keep trying.

Ravinou commented 2 months ago

If you have this error on launching the container :

Error response from daemon: error while creating mount source path '~/volumes/repos': mkdir XXXX/XXXX/volumes/repos: file exists

You can solve this by using the option "allow_root" option with sshfs to authorize the docker daemon to use the mount point :

sshfs -o  uid=1001,gid=1001,allow_root myuser@myuser.your-storagebox.de:/Hetzner-BorgWarehouse ~/volumes/repos

Everything works great and Hetzner storage box is pretty fast.

Ravinou commented 2 months ago

As several people have confirmed that it has worked properly since version 2.2.1, I'm closing this issue. Documentation for external storage is available here.