Backup problem on a live server

Hello All,
I am having problems backing up on a live server with an error display of ‘Service Unavailable’, please see attached error picture,
but on the localhost, it is backing up and downloading the backups successfully.
Is there any configuration on the Globals or anywhere that am not doing well.
Please kindly help out.

openemr 5.0.1(6)
Linux server

Thanks

Is this a remote server? Could this be a permission error?

@aterad,
The problem may occur due to permission error. We can’t predict without the server details.
Hope the below link might help to resolve some issues.
https://wordpress.org/support/topic/503-service-unavailable-on-fresh-install/

Thanks,
ViSolve

@visolveemr @growlingflea
This problem still persist.
I noticed that when a new copy of oemr is freshly installed and yet to be populated with inventory or patients, the backup works perfectly on the same server.
please what could be the cause of this and the solution.

Here is my init.php file details

display_errors = Off
max_execution_time = 600
max_input_time = 600
max_input_vars = 5000
memory_limit = 1024M
post_max_size = 300M
session.gc_maxlifetime = 1440
session.save_path = “/var/cpanel/php/sessions/ea-php70”
upload_max_filesize = 200M
zlib.output_compression = Off

Can you walk we through the screenshots of what you are doing? I’m thinking that there are a few things that could be going on here, but I’m pretty sure its permission related. What operating system are you using? For example, if you are using Ubuntu, please make sure that the vhost the application is running on is owned by www-data. This could also be the permissions granted to the mysql user that OpenEMR has configured to use mySQL.

An easy solution is to run the backup of the database manually from the mysql command line. You can do that using the following line:

mysqldump -u [username] -p [database] > filename.sql

for example, this is what I would use on my system to backup the database “openemr”

Hello @growlingflea ,
I wouldn’t know if it is a permission issue but when i want to do backup i login as administrator.
I always try the backup from openemr interface, is there any other option?
Yes the hosting server is Linux on a shared IP.
As for your suggestion, mysqldump, can you please work me through.
Thanks

Sure. You need to ssh into the server. If you have ssh permissions, you then need to get your mysql username and password that is associated with your instance of OpenEMR. This can be found by going to the sqlconfig.php file. You will want to get the sqlconf.php file that is in your virtual host, not the git repo. Your gitrepo should never hold your mySQL server settings. In my case its /var/www/openemr/sites/default/sqlconfig.php.

with these permissions (lets suppose these are your settings), you can use these settings to do the mysql dump. You would type the following in your terminal. When asked for your password, enter the password that in noted in your settings.

Make sure that you store the sqldump in a place that you can recover it.

You can also set up a cronjob to automatically run the mysqldump command. You would want to mount an external drive (either a physical drive or using GCP or Amazon) to store your data.

These questions seem to pop up repeatedly. My advice is always to use proper server based backup routines. The so-called “backup” function in the admin menu is a joke, and a dangerous placebo at best.
When you’ve got server back ends with 30-40GB of database tables and half a terabyte of stored files, you going to back that up through a client browser? Yeah, not gonna happen.
Honestly, that function should be removed from the code so people don’t assume that it’s going to be a working solution, it gives the false impression that a mouse click can back up your system, that’s not how this works, that’s not how any of this works.

@Penguin8R,
Great response. You just made my day. God bless you. With the foregoing naratives painted by you, with huge backends and loads of files, the admin menu backup is a facade. This is however dependent on the available server memory and bandwidth.
The way out is to use server available tool backup.

Thanks everyone.