Backup Restore: The command is already running in another process

I am running FreePBX using the primary/warm spare setup as documented here:

My nightly backup/restore job on the primary server seems to be getting stuck for some reason. When I attempt to go re-run the job, I am getting the error:

Running with: /usr/sbin/fwconsole backup --backup=‘1f38c816-b792-492f-be5e-1429b472a1d9’ --warmspare --transaction=‘50e96e57-34be-4d91-8561-7ab8b323b4d6’ >> /var/log/asterisk/backup_50e96e57-34be-4d91-8561-7ab8b323b4d6_out.log 2> /var/log/asterisk/backup_50e96e57-34be-4d91-8561-7ab8b323b4d6_err.log & echo $!
The command is already running in another process.

I’ve tried doing an fwconsole restart to no avail. The only way that I’ve been able to re-run the job manually is to reboot the server.

Can anyone point me in the right direction in determining why the backup job is stuck in a running process?

Thank you.

Bump… Anyone?..

Bump again… I really need to figure out why this backup/restore job is getting stuck. Can someone please point me in the right direction? Rebooting the system every day because of this obviously isn’t a realistic long-term solution.

I would greatly appreciate any assistance or input.

Hi, @kwriley87 When you see that " The command is already running in another process error, that moment please check “ps fax|grep fwconsole” to see if “fwconsole backup” command is already running? It might be possible that two backup commands are trying to run at the same time in your system? maybe due to the wrong cron job configuration?

Hi Kapil, thanks so much for your reply.

The output of ps fax|grep fwconsole shows that fwconsole backup is running:

The crontab for root is empty and here is the crontab for the Asterisk user. I’m only seeing one entry for the backup job:

Any other ideas or how two backup commands could be run at the same time? I suppose I could just delete and recreate the backup job…

Thanks for your help.

Hi @kwriley87
Can you please check whether you have selected the CDR and CEL modules for backup restore if yes and you are having huge CDR data then possibly that could be the reason as CDR restore can take hours based on the database size and system configuration.

Please remove CDR and CEL modules from backup and check if you are still facing the issue.

Thank you.
Sandesh Prakash

Hi Sandesh,

I appreciate the reply. I am aware that if the CDRs are large can take an hour or more for the backup to complete. However, this backup has been in progress for 5 days now, so I don’t think it would be stuck on the CDRs for that long :slight_smile:

I haven’t rebooted the server because I want to find the actual problem causing this rather than band-aiding it temporarily with a reboot.


Bump, I am still am having this issue… I would really appreciate some insight into helping me fix this. I’ve deleted and recreated the job and the issue is happening with the new backup job as well.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.