Control Web Panel
WebPanel => Backup => Topic started by: Mak3000 on July 14, 2019, 12:14:20 PM
-
Hi all,
I've a fresh VPS that is hosting 3 simple sites, I decided to use CWP, I really like it, But I faced some issues,
The current issue is backup, The daily backup, in mysql directory, all db are 0 Bytes!! although the main site db is more than 400MB.
I tried to make a full backup from user panel, I got the same issue, db file is 0 Byte.
Any solution for that issue?
-
cwp is using mysqldump so you can try first manually to see if it is working
http://wiki.centos-webpanel.com/import-export-mysql-database
-
cwp is using mysqldump so you can try first manually to see if it is working
http://wiki.centos-webpanel.com/import-export-mysql-database
I tried it manually and got that error "mysqldump: unknown variable 'local-infile=0'", After removing this line "local-infile=0" from my.cnf, it done successfully.
Thanks for help.
-
cwp is using mysqldump so you can try first manually to see if it is working
http://wiki.centos-webpanel.com/import-export-mysql-database
I tried it manually and got that error "mysqldump: unknown variable 'local-infile=0'", After removing this line "local-infile=0" from my.cnf, it done successfully.
Thanks for help.
Do you have [mysqld] along with local-infile=0? It should look like the following in your etc/my.cnf file:
[mysqld]
local-infile=0
-
cwp is using mysqldump so you can try first manually to see if it is working
http://wiki.centos-webpanel.com/import-export-mysql-database
I tried it manually and got that error "mysqldump: unknown variable 'local-infile=0'", After removing this line "local-infile=0" from my.cnf, it done successfully.
Thanks for help.
Do you have [mysqld] along with local-infile=0? It should look like the following in your etc/my.cnf file:
[mysqld]
local-infile=0
You are right, [mysqld] was missing, after adding it as you mentioned, also mysqldump worked fine.
Thank you.
-
No problem. I went through the same thing a while back.
-
cwp is using mysqldump so you can try first manually to see if it is working
http://wiki.centos-webpanel.com/import-export-mysql-database
I tried it manually and got that error "mysqldump: unknown variable 'local-infile=0'", After removing this line "local-infile=0" from my.cnf, it done successfully.
Thanks for help.
Do you have [mysqld] along with local-infile=0? It should look like the following in your etc/my.cnf file:
[mysqld]
local-infile=0
You are right, [mysqld] was missing, after adding it as you mentioned, also mysqldump worked fine.
Thank you.
Thank you! (i had the same problem)
-
In my case sql backup doesn't work due to account username being longer than database name. I migrated cpanel account where db is imported from old naming scheme but account was created on new one allowing long usernames.
For example, username on account is 12345678910 but database name is 12345678_dbx. Query which gets database names for given account uses "username" string thus it fails to find mysql db. (It takes as mandatory that all databases under account must start with username_xx string.)
Workaround is to create daily cron job which will dump db to home dir to be packed later by backup.
-
I actually agree with the policy of matching database prefix with the username. WHM/cPanel pandered to Windows/Mac lusers by allowing a larger prefix/username, IMHO.
Personally, I'd have renamed the username.
Each to their own, as the saying goes.
-
I actually agree with the policy of matching database prefix with the username. WHM/cPanel pandered to Windows/Mac lusers by allowing a larger prefix/username, IMHO.
Personally, I'd have renamed the username.
Each to their own, as the saying goes.
Yes that makes sense to some point. Much better would be to query for all db-s owned by "username" than to match predetermined name prefix.
It's something i'll try to dig in following days.
Changing username on account is not simple task in production.
-
Hmm, might consider extending my custom backup, to cater for the imported cPanel scenario. May not be able to post it here though, given recent events. ;)
-
I've had a look at my custom script and how database relationships are stored and it doesn't appear to be very straightforward (not impossible).
I'd need to restore a few more cPanel accounts, to get a better picture on what's going on.
Example:
mysql/db stores users against databases but can contain near duplicates such as, user maps to all user databases and user_xxxx maps to database_yyyy
Any queries (to grab the list of user databases) may need to exclude root,postfix and roundcube
The developers are likely have a better insights as to how this may be achieved.
-
Thanks Rug3r! I had this issue foir a while and this solved it! Thanks!
cwp is using mysqldump so you can try first manually to see if it is working
http://wiki.centos-webpanel.com/import-export-mysql-database
I tried it manually and got that error "mysqldump: unknown variable 'local-infile=0'", After removing this line "local-infile=0" from my.cnf, it done successfully.
Thanks for help.
Do you have [mysqld] along with local-infile=0? It should look like the following in your etc/my.cnf file:
[mysqld]
local-infile=0