Hi,
Below, are the steps to take, when you want to setup an RSYNC backup job between a local folder, and a Storagebox from Hetzner.
Prerequisites
- Create an SSH key on OMV over CLI
- Copy the SSH keys (public/private over CLI)
Create the keys
SSH into your OMV
Generate the SSH key
Then, upload the key to Hetzner's Storage box user/sub-user
cat /root/.ssh/hetzner_storagebox.pub | ssh -p 23 [username]@u[username].your-storagebox.de install-ssh-key
Accept the host key (This is critical for OMV)
Enter your storage box password, when prompted
You will receive the following response
Key No. 1 (ssh-rsa root@omv-storage) was installed in RFC4716 format
Key No. 1 (ssh-rsa root@omv-storage) was installed in OpenSSH format
Test connection
Next step, is to import the keys into OMV
Go to System > Certificates > SSH
Click + and then click import, however, before you do this, please following the steps below, over CLI
Display both keys, and paste them inside the right locations in the GUI, start with the private key
This will display the following
Copy the full part, from the start to finish, and paste this inside the text field, for the private key
Then, display the public key, and do the same
This displays
Copy the full part, from start to finish, and paste this inside the text field, for the public key
Add a tag, because you need this shortly, and click on Import
Create your RSYNC job
Go to Services > RSYNC > Tasks
Click on Create
- Type: Remote
- Mode: Push
- Source: Your folder
- Destination server: USERNAME@USERNAME.your-storagebox.de:
NOTE: Important, you need to add the : at the end, otherwise it won't work - Authentication: Public Key
- SSH Port: 23
- SSH Certificate: The certificate we created, with the tag you added.
- Set the time/date you want to run it, and add a tag
Click Apply
Then, do a test run, you will see output:
Please wait, syncing </srv/[diskname]/[foldername]/> to <[username]@[username].your-storagebox.de> ...
[file summary here]
sent 68,508 bytes received 392 bytes 45,933.33 bytes/sec total size is 67,185 speedup is 0.98 The synchronisation has completed successfully. END OF LINE
Congratulations, you can now sync to your remote storage box