Recently (with Virtualmin 3.96) my SSH backups stopped working. When run as scheduled or manually from the web interface, it gets to the stage where it tries to upload the archive, and then complains "No such file or directory". The same backup works fine when done from the command line with backup-domain.pl, provided that the target directory already exists.
More details (sensitive information redacted): This works from the command line: /usr/libexec/webmin/virtual-server/backup-domain.pl --all-domains --all-features --incremental --dest ssh://myuser:mypassword@my.domain.name:portnumber:/Volumes/Closet/Webserver\ Backups/incr-2012-12-10 --onebyone --separate --newformat
But the scheduled backup described here by /usr/libexec/webmin/virtual-server/list-scheduled-backups.pl --multiline does not work, either on schedule or by manual invocation:
134008297411003 Domains: All Include sub-servers: Yes Destination: ssh://myuser:mypassword@my.domain.name:portnumber:/Volumes/Closet/Webserver\ Backups/incr-%Y-%m-%d Delete old backups after: Never Features: All Format: One file per server Incremental: Yes Enabled: Yes Cron schedule: daily Send email to: paul@mustbeart.com Send email: Always Notify domain owners: No
The scheduled backup runs up to where it tries to upload the files. In particular, it successfully creates the directory /Volumes/Closet/Webserver\ Backup/incr-2012-12-10, so we know the credentials are correct. Then, when it tries to upload the archive, it complains that:
scp: /Volumes/Closet/Webserver\ Backups/incr-2012-12-10: No such file or directory
even though that directory does exist on the remote server, having just been created.
The remote server is a Mac Mini running Mac OS X 10.8.2. There were no changes that I'm aware of on the remote server. The problem started on the same day that I updated to VirtualMin 3.96.
Comments
Submitted by JamieCameron on Mon, 12/10/2012 - 13:19 Comment #1
This could be an issue with the space in the destination directory name. Do you can get the same error if backing up to a directory without a space in the path?
Submitted by kb5mu on Mon, 12/10/2012 - 17:27 Comment #2
Without the space in the path, the problem is gone. Thanks!
Of course, this USED to work.
Submitted by JamieCameron on Mon, 12/10/2012 - 18:10 Comment #3
Wait, I think I see the issue. When you enter the backup path in Virtualmin, you no longer need to enter a \ before the space in the directory name. Previously there was a bug that caused this to be required, but it was fixed in 3.96.
Submitted by kb5mu on Mon, 12/10/2012 - 19:03 Comment #4
If I put back the space, but not the backslash, I get a different error. Instead of creating a directory and putting the .tar.gz, .tar.gz.dom and .tar.gz.info files into it, it creates a single file with the base name (containing the .tar.gz contents) and then fails to upload the .tar.gz.info file as follows:
.. upload failed! Password: scp: /Volumes/Closet/Webserver Backups/foo-2012-12-10/mydomain.com.tar.gz.info: Not a directory
To clarify:
/Volumes/Closet/Webserver Backups/foo-2012-12-10
... is the .tar.gz file, not a directory, but it still tries to upload
/Volumes/Closet/Webserver Backups/foo-2012-12-10/mydomain.com.tar.gz.info
It does this regardless of whether I checked the "Create destination directory?" box.
Submitted by JamieCameron on Tue, 12/11/2012 - 13:48 Comment #5
I wasn't able to re-produce this problem, sorry.
Have you tried upgrading to 3.97 yet? It fixes a couple of bugs in this area ..
Submitted by kb5mu on Tue, 12/11/2012 - 19:14 Comment #6
I just upgraded to 3.97 and went to try testing the backups through the gui.
The "Backup Level" setting is three radio buttons with just one label. There's no way to tell what the other settings means, though I can probably guess. This is a new problem.
As for backup behavior, here's what I see with 3.97:
With a space and no backslash ... it does the same thing 3.96 did: it creates the basename as a file and then tries to use it as a directory (and fails).
With a space and a backslash ... it does the same thing 3.96 did: it creates the directory successfully and then complains that it doesn't exist.
With no space ... it does the same thing 3.96 did: it succeeds.
Submitted by JamieCameron on Tue, 12/11/2012 - 22:12 Comment #7
Would it be possible for you to attach (or email me at jcameron@virtualmin.com) the backup form so I can see exactly what settings you have?
Submitted by JamieCameron on Tue, 12/11/2012 - 22:21 Comment #8
Wait, I see the bug now - oddly this only happens when backing up from the Virtualmin UI, and when the last part of the target directory doesn't exist.
This (and the issue with the backup level) will be properly fixed in the 3.98 release.
Submitted by Issues on Tue, 12/25/2012 - 22:46 Comment #9
Automatically closed -- issue fixed for 2 weeks with no activity.