I have two OMV (NAS and BackupNas) both running 5.5.11-1 with BorgBackup 5.1.5. On either I can create a shared folder and then create a local Repo.
What I would like to do is create a Repo on BackupNAS to backup NAS to (remote).
1) If I create the Repo on BackupNAS and then on NAS create a repo pointing to the one on BackupNAS with "Skip init" selected I get an Error on NAS
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='password' /usr/bin/borg check --repository-only --info 'scott@backupnas:/srv/dev-disk-by-label-Backup/Borg/'' with exit code '2': in /usr/share/php/openmediavault/system/process.inc:182
If I run the command myself it initially failes becuase BorgBackup has created the Repo all owned by root
PermissionError: [Errno 13] Permission denied: '/srv/dev-disk-by-label-Backup/Borg/config'
If I chown recuresively the directory then the command will complete if run by hand
scott@nas:~$ BORG_PASSPHRASE='password' /usr/bin/borg check --repository-only --info 'scott@backupnas:/srv/dev-disk-by-label-Backup/Borg/'
Remote: Starting repository check
Remote: Starting repository index check
Remote: Index object count match.
Remote: Completed repository check, no problems found.
However the wizzard in the plugin will still fail as above
2) If I create a Shared Folder on BackupNAS and then create a repo from NAS remotely it fails
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='password' /usr/bin/borg init --encryption=none 'scott@backupnas:/srv/dev-disk-by-label-Backup/Borg/'' with exit code '2': in /usr/share/php/openmediavault/system/process.inc:182
Stack trace:
#0 /usr/share/openmediavault/engined/rpc/borgbackup.inc(158): 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(537): OMV\Rpc\Rpc::call('BorgBackup', 'setRepo', Array, Array, 1)
#5 {main}
Running the command by hand works (the directory is writable by scott)
scott@nas:~$ BORG_PASSPHRASE='password' /usr/bin/borg init --encryption=none 'scott@backupnas:/srv/dev-disk-by-label-Backup/Borg/'
and creates the repo
scott@backupnas:/srv/dev-disk-by-label-Backup/Borg$ ls -al
total 72
drwxrwsr-x 3 root users 4096 Sep 23 09:46 .
drwxr-xr-x 6 root root 4096 Sep 23 09:41 ..
-rw------- 1 scott users 209 Sep 23 09:46 config
drwx--S--- 3 scott users 4096 Sep 23 09:46 data
-rw------- 1 scott users 52 Sep 23 09:46 hints.1
-rw------- 1 scott users 41258 Sep 23 09:46 index.1
-rw------- 1 scott users 190 Sep 23 09:46 integrity.1
-rw------- 1 scott users 73 Sep 23 09:46 README
and the check works
scott@nas:~$ BORG_PASSPHRASE='password' /usr/bin/borg check --repository-only --info 'scott@backupnas:/srv/dev-disk-by-label-Backup/Borg/'
Remote: Starting repository check
Remote: Starting repository index check
however trying to tell BorgBackup to use that remote repo still fails with the same error
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='password' /usr/bin/borg check --repository-only --info 'scott@backupnas:/srv/dev-disk-by-label-Backup/Borg/'' with exit code '2': in /usr/share/php/openmediavault/system/process.inc:182
Stack trace:
#0 /usr/share/openmediavault/engined/rpc/borgbackup.inc(158): 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(537): OMV\Rpc\Rpc::call('BorgBackup', 'setRepo', Array, Array, 1)
#5 {main}
So I can not move on to create an archive.
Any suggestions for debugging greatly recieved