Tried making a backup of the virtual servers on my local machine (in preparation of migrating to a new server).
My weekly remote SSH backups have typically run fine in the past however in this case i’m backing up locally to /root/
Most of the virtual server backups completed successfully however there were a few that would always halt the backup process with the following message (‘Features to backup’ set to ‘Backup all features’)
Backup failed : Failed to open /home/domainname/.backup/domainname.com_unix : Permission denied
If i untick the option to backup ‘Administration user’s password, quota and Cron jobs’ and then try again I get:
Backup failed : Failed to open /home/domainname/.backup/domainname.com_dns : Permission denied
If i then untick ‘Records in DNS domain, except SOA’ I get the following, and so on.
Backup failed : Failed to open /home/domainname/.backup/domainname.com_web.webmintmp.9031 : Permission denied
If i choose to only back up only the home directory that works at least, but i can’t even tick the option to backup mysql as that throws a:
Backup failed : Failed to open /home/domainname/.backup/domainname.com_mysql : Permission denied
I’ve pasted a copy off an example .backup directory below. Notice how none of the files that the script errors out on actually exist:
drwxrwxrwx 2 root root 4096 2015-02-20 00:29 ./
drwxrwx--- 14 root root 4096 2015-02-20 00:29 ../
-rwx------ 1 root root 2215 2015-02-20 00:29 domainname.com_virtualmin*
-rw-r--r-- 1 root root 6891 2015-02-20 00:00 domainname.com_virtualmin_bw
-rw-r--r-- 1 root root 260 2014-08-28 15:46 domainname.com_virtualmin_plan
-rwxr-x--- 1 root root 0 2015-02-20 00:29 domainname.com_virtualmin_scripts*
Finally whenever this happens I don’t get a error message emailed to me. Also rthis maybe be unrelated but I originally tried to backup all my servers via the ‘Backup in background’ option however this would only backup 4 servers before failing.
Anyway just thought i’d report my experience. It does seem weird no one else has experienced the same issue so it might just be a weird quirk with my server. I can probably get around this manually one way or another so no worries about delving too deep into this. I just wanted to report it in case anyone else ever has similar issues.
Oh and thanks for Virtualmin. I’ve been using it to host my own sites for years but still find myself once a month or so in utter appreciation of the fact that it exists and the effort that’s gone into maintaining and expanding it over the years. It doesn’t go unnoticed and truly is a superb gift to mankind.
Which Virtualmin version are you using there, is it the latest? There were some problems with backups on previous versions, the most recent release fixes those.
Another thing you’d want to make sure of is to verify that two backups aren’t running at the same time – that could potentially cause a conflict.
Also, when no backups are running, could you verify that on .backup directory exists within /home/username?
Yep, running the latest version of Virtualmin.
Also am pretty sure there’s no other backups running. There’s no task running in ‘top’ that i can see…
The .backup folders are only created once virtualmin begins trying to backup that domain.
They are however leftover when the backup fails. It makes no difference whether these are manually deleted or not.
Got a slightly more verbose error message (not sure why!) this time:
Creating backup for virtual server domainname.com ..
Copying virtual server configuration ..
Backing up Cron jobs ..
HTTP/1.0 500 Perl execution failed Server: MiniServ/1.730 Date: Fri, 20 Feb 2015 10:36:00 GMT Content-type: text/html; Charset=iso-8859-1 Connection: close
Error - Perl execution failed
Failed to open /home/domainname/.backup/domainname.com_unix : Permission denied at ../web-lib-funcs.pl line 1397, line 1.
Tracked down line 1397 of web-lib-funcs.pl:
I’ve been having similar problems in PHP whereby i’ve been getting 500 errors on exit(); statements, which is the reason i’m migrating my server as i can’t figure out what the issue is.
I did notice however that in this case order to get to that point an error must already of been generated as that part of the code merely appears to be a subroutine for handling errors.
Either way I think this may just be an issue with my server. I suspect it’s a permissions thing, as ran a command similar to: ‘chown root:root .*’ that somehow started chowning every file to root rather than just the .dot files in the current directory. Stopped it before reached the /home directories and corrected /var as best i could but been having occasional mod_fgcid related, premature end of script 500 errors since then.
I have started getting related issues:
Failed to write to /home/xxx/.backup/xxx_web_alog : Broken pipe at /usr/libexec/webmin/web-lib-funcs.pl line 1397, line 316
You guys may want to file a bug report for those issues… I’m not sure what might be causing them, but backups are important and we may need to get Jamie involved so we can get a new release out shortly that fixes any outstanding backup bugs.
Just make sure you’re using the most recent Virtualmin version.
Did anything develop from this?
I am getting this error now!
It doesn’t look like this is a bug. It looks like this solution fixes the problem:
I’ve started getting a very similar issue on backups for a particular Virtualmin sub server account. The following error is thrown during backup process. . .
Failed to write to /home/xxx/domains/example.com/.backup/example.com_web_alog : Broken pipe at /usr/libexec/webmin/web-lib-funcs.pl line 1397, line 3406706
This is making backups fail for the entire root account. I’ve tried all the fixes and nothing appears to work. The account is not over quota, and all the permissions appear to be fine. I’m growing worried as I’ve not made a backup of this account for quite some time now. Need to get this diagnosed.