SSH backup not working when upload only allowed to specific subfolder

When selecting ssh server as backup source, virtualmin will try to upload a test file first in /tmp, then in ~/ and fail if nothing works.

Some provider will provide an scp / sftp accessible drop zone but will only allow to upload to a specific sub folder.

Adding The following to webmin/virtual-server/backups-lib.pl

            if ($scperr) {
                    $scperr = undef;
                    $testfile =  $path . "/virtualmin-copy-test.$testuser";
                    $r = ($user ? "$user\@" : "").$qserver.":".$testfile;
                    &scp_copy($temp, $r, $pass, \$scperr, $port);
                    }

at line 324, right after the copy to the current dir solves the issue.

Status: 
Closed (fixed)

Comments

Good idea .. I will add this in the next Virtualmin release.

Automatically closed -- issue fixed for 2 weeks with no activity.