Submitted by christefano on Sun, 11/07/2010 - 04:51 Pro Licensee
This error just started happening:
A backup to the same destination is already running with PID 31600
It is reported to the email address that I set up for when there are failed backups. I don't encounter any problems at all when running backups manually.
I was surprised to see that there aren't any search results at all for "a backup to the same destination is already running" so I'm making this ticket as public for now.
Status:
Active
Comments
Submitted by andreychek on Sun, 11/07/2010 - 07:15 Comment #1
What output do you see if you run this command as root from the command line on your server:
crontab -l | grep backup
Submitted by JamieCameron on Sun, 11/07/2010 - 12:31 Comment #2
Do you actually have two backups scheduled to the same destination? Or is the time between backup runs lower than the time is actually takes to complete?
Submitted by christefano on Sun, 11/07/2010 - 18:25 Pro Licensee Comment #3
Here is the output of
crontab -l | grep backup
:0 4 * * * /etc/webmin/virtual-server/backup.pl --id 12750384387272
@hourly /etc/webmin/virtual-server/backup.pl --id 12750388197724
Submitted by christefano on Sun, 11/07/2010 - 18:25 Pro Licensee Comment #4
There are only two backups set to run and they haven't conflicted before... this is a recent development.
Submitted by JamieCameron on Sun, 11/07/2010 - 19:26 Comment #5
What are the destinations of those two backups?
Also, if you check the backup logs in Virtualmin, how long do they run for? If an hourly run was to last longer than an hour, you would get this error.
I experienced this as of upgrading to Virtualmin 3.82:
Backup failed! See the progress output above for the reason why. Total backup time was 00 minutes, 03 seconds.
Virtual servers that failed :
{list of all virtual servers}
Sent by Virtualmin at: https://servername:10000
A backup to the same destination is already running with PID 21936
These are the two jobs I have set up:
Yes, weekly (on Sunday) Full
Yes, at cron time 0 0 * * 1-6 Incremental
So there is no cross over of backups - its one a day with a full back up starting at midnight Sunday morning, the rest incremental.
Last successful full backup:
31/Oct/2010 00:00 3:26:12 8.85 GB Yes
Last successful Incremental backup:
06/Nov/2010 00:00 20:03 863.79 MB Yes
I upgraded to 3.82 on the 05/Nov/2010 at 10:04:33, so for some reason it looks like the backup ran successfuly at midnight of the 6th, but hung and so failed on the 7th and 8th.
crontab -l | grep backup results in this output:
@weekly /etc/webmin/virtual-server/backup.pl 0 0 * * 1-6 /etc/webmin/virtual-server/backup.pl --id 1224493658791
Submitted by christefano on Mon, 11/08/2010 - 04:24 Pro Licensee Comment #7
Re: #5, There are only two backups and they save to separate destinations:
/root/Dropbox/backups/everything/%G-%m-%d-%H%M
/root/Dropbox/backups/mysql/%G-%m-%d-%H%M
The "everything" backups are the ones that are failing. They run once a day and, when successful, take about 2 hours to complete.
Submitted by JamieCameron on Mon, 11/08/2010 - 13:01 Comment #8
When you see a failure like this, check the directory
/etc/webmin/virtual-server/backuplocks
for a .lock file whose name is based on the problem destination. In it should be a PID file for the process that is still running on the backup ..Submitted by christefano on Thu, 11/11/2010 - 01:54 Pro Licensee Comment #9
Removing the
.lock
file makes it possible for me to do a manual backup, but the daily, automatic backups are still failing.Submitted by JamieCameron on Thu, 11/11/2010 - 01:59 Comment #10
When an automated backup runs and fails, what process's ID is in that .lock file?
Submitted by christefano on Fri, 12/03/2010 - 15:08 Pro Licensee Comment #11
This just happened again and there's actually no .lock file in
/etc/webmin/virtual-server/backuplocks
Submitted by christefano on Fri, 12/03/2010 - 15:10 Pro Licensee Comment #12
Okay... another backup completed just 3 minutes later. Why are two backups running when there's only one listed for databases at https://spaceti.me:10000/virtual-server/list_sched.cgi ?
Submitted by JamieCameron on Fri, 12/03/2010 - 15:14 Comment #13
Someone else reported something similar to this recently, and I was finally able to track it down. It turns out there is a bug in the detection of concurrent backups that can falsely trigger this error :-(
The next Virtualmin release (3.83) will fix the bug. Let me know if you'd like to get a patch with a fix sooner ..
Submitted by Issues on Fri, 12/17/2010 - 15:19 Comment #14
Automatically closed -- issue fixed for 2 weeks with no activity.
Submitted by christefano on Fri, 12/17/2010 - 16:11 Pro Licensee Comment #15
Re: #13:
Yes, please provide a patch. Thanks! 3.8.3 isn't available yet, so I'm reopening this.
Submitted by JamieCameron on Fri, 12/17/2010 - 16:34 Comment #16
I've attached a diff file for /usr/{share,libexec}/webmin/virtual-server/backups-lib.pl to this bug report.
Be sure to run
/etc/webmin/restart
after applying it.Submitted by christefano on Fri, 12/17/2010 - 18:00 Pro Licensee Comment #17
Thanks! The patch applied successfully:
$ patch -p0 /usr/share/webmin/virtual-server/backups-lib.pl < /root/backups-lib.pl.diff
patching file /usr/share/webmin/virtual-server/backups-lib.pl
Hunk #1 succeeded at 414 (offset -2 lines).
Hunk #2 succeeded at 432 (offset -2 lines).
Hunk #3 succeeded at 1086 (offset -48 lines).
I'll see soon enough if it works. Running Debian 5 Lenny.
Submitted by ashleydrees on Sat, 02/06/2016 - 08:12 Pro Licensee Comment #18
Started getting these recently, i have a full backup on sunday at 2 am and incremental at 2 other days... the total backup time is a couple of hours for the full and a few 10's of mins for the incremental - i do not have duplicates statements in the cron, these happen every time the backup is fired.. i get two backup jobs fired, the first one works the second/other fails - i realise this is not a backup issue but a cron or scheduling issue, the first backup always works, the second always fails.
I have just deleted both the full and the incremental and re-made them. will report back on results.
Submitted by andreychek on Sat, 02/06/2016 - 10:20 Comment #19
Sorry that you're having problems with backups!
This particular issue is 6 years old though... is there any chance you could start a new issue, and there, can you show us what you see when going into Backup and Restore -> Scheduled Backups? Thanks!