Unable to get Borg Backup up and running

  • I'm running OMV with 1 SSD and a ZFS pool, and right now I'm trying to get a borg backup set up for the SSD which contains the OS (version 4.1.22-1) and other configs.
    I have a remote backup server (not OMV) which I can access through VPN at 192.168.2.100, the OMV server is local with ip 192.168.1.100.


    I've set up ssh keys for root and "adm" user (adm is a user I created for accessing omv with ssh), both are able to reach the remote server by running
    ssh borg@192.168.2.100
    the borg user on the remote server requires a passphrase to access.


    Borg on my OMV machine is version 1.1.5 and I updated the remote server to have the same.


    So now I try to set up borg backup using the plugin in the UI and set it up like this:



    This results in an error:
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; BORG_PASSPHRASE='XXXXXX' /usr/bin/borg init --encryption=none 'borg@192.168.2.100:/volume1/backups/borg'' with exit code '2':


    The detailed stacktrace:
    Error #0:OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; BORG_PASSPHRASE='XXXXXX' /usr/bin/borg init --encryption=none 'borg@192.168.2.100:/volume1/backups/borg'' with exit code '2': in /usr/share/php/openmediavault/system/process.inc:182Stack trace:#0 /usr/share/openmediavault/engined/rpc/borgbackup.inc(152): OMV\System\Process->execute(Array)#1 [internal function]: OMVRpcServiceBorgBackup->setRepo(Array, Array)#2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)#3 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('setRepo', Array, Array)#4 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('BorgBackup', 'setRepo', Array, Array, 1)#5 {main}


    This error doesn't really tell me anything other than a setRepo rpc seems to fail.


    So first off I haven't been able to find any documentation for the plugin, so that would be great.
    Which user does the plugin use for connecting through ssh to the remote server?


    Suggestions to troubleshoot this? I'll supply more information if I happened to leave something out.

  • This error doesn't really tell me anything other than a setRepo rpc seems to fail.

    Did you try to execute the command from the output to see what the error is?


    So first off I haven't been able to find any documentation for the plugin, so that would be great.

    When I wrote the plugin, I tried to make it use all of the same terminology as the borgbackup documentation. So, the process would be the same. I don't use the plugin myself so someone else needs to write documentation if this doesn't work.


    Which user does the plugin use for connecting through ssh to the remote server?

    Uh, that is documented under Remote Path text field. You are specifying borg. So, that is the user it is connecting with.

    omv 5.5.11 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Have you managed to configure your borg repo so far?


    If still not you may want to know that there is an issue with the plugin and all borg repos that connect via ssh. The first time you connect to the repo they send back an ECDSA request for verification that the plugin does not handle and does not expect that make all fail.


    If this is your case, bypassing this is as simple as first creating the repo and then, before setting it up with the plugin (in fact issuing an init command to the repo), making any kind of ssh connection to the repo from the ssh console of the OMV host just to receive the verification request that you must accept by hand. It does not mind if the ssh command fails or not. You get the remote host validated in your OMV host and now you can register your repo without any further issues.


    As told I do not know if you have managed to resolve your issue but just in case here you have what I had to do to be able to register mine. Hope this help.


    Regards.

  • I tried also to setup a remote repo and I had an issue with the plugin.
    I forgot to install borgbackup on the remote server !


    Then plugin was able to init the remote repo.


    To find your issue, try to execute the command displayed by the plugin error message (as root)


    Hope this helps.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!