Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hetzner StorageBox compatibility #196

Closed
Iliannnn opened this issue Mar 27, 2024 · 7 comments
Closed

Hetzner StorageBox compatibility #196

Iliannnn opened this issue Mar 27, 2024 · 7 comments

Comments

@Iliannnn
Copy link

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
Copy link

Zyztem commented Mar 27, 2024

+1

1 similar comment
@MilesTEG1
Copy link

+1

@Ravinou
Copy link
Owner

Ravinou commented Apr 7, 2024

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
Copy link
Author

Iliannnn commented Apr 7, 2024

I will try thanks

@Ravinou
Copy link
Owner

Ravinou commented Apr 7, 2024

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

@Ravinou
Copy link
Owner

Ravinou commented Apr 7, 2024

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
Copy link
Owner

Ravinou commented Apr 13, 2024

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.

@Ravinou Ravinou closed this as completed Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants