Submitted by Hal9000 on Sun, 05/08/2011 - 02:59
Hello!
I upgraded a Virtualmin GPL installation to 3.85 and now the backup job fails.
Basically, I backup to an ssh target to this path
/mnt/backups/mercury/%d-%m-%Y
It used to work fine, but since I installed 3.85 it fails with the following message:
upload failed! scp: /mnt/backups/mercury/08-05-2011: Not a directory
I also tried with a trailing slash to the path, but I am getting the same error.
Status:
Closed (fixed)
Comments
Submitted by andreychek on Sun, 05/08/2011 - 09:06 Comment #1
Howdy -- can you verify that in the settings for your backup job, that the "Create destination directory?" option is still checked?
Submitted by Hal9000 on Sun, 05/08/2011 - 09:10 Comment #2
yes, it is still checked.
Submitted by andreychek on Sun, 05/08/2011 - 09:50 Comment #3
Hmm, reading the error closer, it says that the destination isn't a directory (which may imply it exists as a file).
What output do you receive if you type this:
ls -lh /mnt/backups/mercury/08-05-2011
Submitted by Hal9000 on Sun, 05/08/2011 - 17:38 Comment #4
Exactly, for some reason it does not create a directory anymore, it creates a file...
Submitted by JamieCameron on Sun, 05/08/2011 - 19:21 Comment #5
On the backup form, what do you have selected for "Backup format" ?
Submitted by Hal9000 on Tue, 05/10/2011 - 01:54 Comment #6
one file per server, i believe bz2 format. i also selected the strftime-style time substitutions and the Transfer each virtual server after it is backed up.
Submitted by Hal9000 on Tue, 05/10/2011 - 01:56 Comment #7
oh, btw, since virtualmin 3.85 is installed i also have these errors coming in on the daily cron:
Failed to run /usr/share/webmin/virtual-server/sendratings.pl : No such file or directory at /etc/webmin/virtual-server/sendratings.pl line 11.
Submitted by JamieCameron on Tue, 05/10/2011 - 11:20 Comment #8
That sendratings.pl error is a separate bug - I'll fix that in the next release.
Regarding the format, did you select "Single archive file", "One file per server (old format)", or "One file per server".
Submitted by Hal9000 on Fri, 05/13/2011 - 01:50 Comment #9
sorry, i though i replied, but there must have been a server error and didn't notice. i have selected single archive. see comment #6
Submitted by JamieCameron on Fri, 05/13/2011 - 16:03 Comment #10
Ok, that should work .. I presume that the directory /mnt/backups/mercury already exists?
If you delete /mnt/backups/mercury/08-05-2011 and re-run the backup, is it re-created as a directory or a file? If a file, what does it contain?
Submitted by Hal9000 on Fri, 05/13/2011 - 16:08 Comment #11
Yes, the destination root exists. If I delete the file and re-run backup, it gets recreated as file. If I open it with nano, I see some weird stuff...
Submitted by JamieCameron on Fri, 05/13/2011 - 16:13 Comment #12
If you run
file
with that file as a parameter, what does it output?Submitted by JamieCameron on Fri, 05/13/2011 - 16:33 Comment #13
Also, it would be useful to see the full output from the backup process or email ..
Submitted by Hal9000 on Sat, 05/14/2011 - 00:30 Comment #14
atlantis:/mnt/backups/mercury# file 14-05-2011
14-05-2011: bzip2 compressed data, block size = 900k
and
Backup failed! See the progress output above for the reason why. Total backup time was 01 minutes, 57 seconds.
Sent by Virtualmin at: https://mercury.foo.bar:10000
Creating backup for virtual server foo.bar ..
Copying virtual server configuration ..
.. done
Backing up Cron jobs ..
.. done
Copying records in DNS domain ..
.. done
Saving mail aliases ..
.. done
Saving mail and FTP users ..
.. done
Backing up mail and FTP user Cron jobs ..
.. none to backup
Copying Apache virtual host configuration ..
.. done
Copying Apache log files ..
.. done
Copying SSL Apache virtual host configuration and certificate ..
.. done
Copying Logrotate configuration ..
.. done
Dumping MySQL database foo_com_roundcube ..
.. done
Dumping MySQL database foo_com_whmcs ..
.. done
Copying Procmail and SpamAssassin configuration files ..
.. done
Backing up Webmin ACL files ..
.. done
Backing up AWstats configuration file ..
.. done
Backing up DAV users file ..
.. done
Backing up Subversion repositories and configuration files ..
.. done
Creating TAR file of home directory ..
.. done
Uploading archive to SSH server atlantis.foo.bar ..
.. done
Creating backup for virtual server mercury.foo.bar ..
Copying virtual server configuration ..
.. done
Saving mail aliases ..
.. done
Saving mail and FTP users ..
.. done
Backing up mail and FTP user Cron jobs ..
.. none to backup
Copying Apache virtual host configuration ..
.. done
Copying SSL Apache virtual host configuration and certificate ..
.. done
Copying Logrotate configuration ..
.. done
Creating TAR file of home directory ..
.. done
Uploading archive to SSH server atlantis.foo.bar ..
.. done
Creating backup for virtual server foo.eu ..
Copying virtual server configuration ..
.. done
Copying records in DNS domain ..
.. done
Saving mail aliases ..
.. done
Saving mail and FTP users ..
.. done
Backing up mail and FTP user Cron jobs ..
.. none to backup
Copying Apache aliases ..
Creating TAR file of home directory ..
.. done
Uploading archive to SSH server atlantis.foo.bar ..
.. done
Creating backup for virtual server foo.ch ..
Copying virtual server configuration ..
.. done
Copying records in DNS domain ..
.. done
Saving mail aliases ..
.. done
Saving mail and FTP users ..
.. done
Backing up mail and FTP user Cron jobs ..
.. none to backup
Copying Apache aliases ..
Creating TAR file of home directory ..
.. done
Uploading archive to SSH server atlantis.foo.bar ..
.. done
Creating backup for virtual server foo.de ..
Copying virtual server configuration ..
.. done
Copying records in DNS domain ..
.. done
Saving mail aliases ..
.. done
Saving mail and FTP users ..
.. done
Backing up mail and FTP user Cron jobs ..
.. none to backup
Copying Apache aliases ..
Creating TAR file of home directory ..
.. done
Uploading archive to SSH server atlantis.foo.bar ..
.. done
Saving Virtualmin configuration ..
.. done
Saving templates and plans ..
.. done
Saving email templates ..
.. done
Saving custom fields, links, categories and shells ..
.. done
Saving scheduled backups ..
.. done
Saving DKIM settings ..
.. done
Saving greylisting settings ..
.. done
Saving mail server configuration ..
.. done
.. done
Uploading archive to SSH server atlantis.foo.bar ..
.. upload failed! scp: /mnt/backups/mercury/14-05-2011: Not a directory
Submitted by JamieCameron on Sat, 05/14/2011 - 11:59 Comment #15
Ok, I see the bug that is causing this now .. it is new in 3.85, and only triggers when doing a backup to a remote SSH server and backups are being copied one domain at a time.
The fix is to edit the file
/usr/share/webmin/virtual-server/backups-lib.pl
and change line 289 from :local $mkcmd = $sshcmd." mkdir -p ".quotemeta($pathdir);
to:
local $mkcmd = $sshcmd." mkdir -p ".quotemeta($path);
Then run
/etc/webmin/restart
Submitted by Hal9000 on Sat, 05/14/2011 - 12:42 Comment #16
Thank you! This fixed the problem :)
Submitted by JamieCameron on Sat, 05/14/2011 - 14:38 Comment #17
OK, great!
Submitted by Issues on Sat, 05/28/2011 - 16:21 Comment #18
Automatically closed -- issue fixed for 2 weeks with no activity.