localhost database backups error

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
amyat
Veteran Member
Posts: 45
Joined: 2020-06-24 20:39

localhost database backups error

Post by amyat » 2021-10-16 15:51

I'm trying to database backup localhost
so i go advanced system setting/environment variables/system variables and
new add C:\xamp\mysql\bin

when i click create backup file in admin area ,
show "please wait" and can't do anymore..
and show
" Our website is currently down for maintenance
We expect to be back in a couple hours. Thanks for your patience." when reload current page.

what should i do for this page start normal
and how to database backup in localhost

bkerr
Posts: 7
Joined: 2020-11-04 18:22

Re: localhost database backups error

Post by bkerr » 2021-12-28 07:29

This was the advice I received when asking about " Our website is currently down for maintenance
We expect to be back in a couple hours. Thanks for your patience."

During backup, the site is put temporarily into maintenance mode till the backup finishes. It seems that the backup hanged and never got out of maintenance mode. You can disabled that mode by deleting the file ".maintenance" from the admin folder.[/i]

I have also added the C:\xampp\mysql\bin to the path and I still can not do backups with Windows. I was looking for an answer myself.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: localhost database backups error

Post by pbottcher » 2021-12-29 10:33

Hi,

is it possible that you have not set a password for your DB as you use it localy? If this is the case, the backup will start, but mysqldump will prompt for a password which causes the command to hang.

You can modify the create_backup() function in the admin/pageBackupRestore.php file and set

Code: Select all

$pass_param = ((empty($config['dbPassword']) || $config['dbPassword']=='""') ? "" : "-p{$config['dbPassword']}" );
That could help.
!! Please note that this file gets overwritten if you recreate your project.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

bkerr
Posts: 7
Joined: 2020-11-04 18:22

Re: localhost database backups error

Post by bkerr » 2022-01-01 23:14

That worked!

Thanks

Post Reply