Current time: 12-30-2024, 04:30 AM Hello There, Guest! (LoginRegister)


Thread Closed 
Improve the mysqldump in the Backup
Author Message
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #1
Improve the mysqldump in the Backup
Hello Community,

i checked the mysqldump function in the backupscript
Code:
/var/www/ispcp/engine/backup/ispcp-backup-all
What do you think about to improve this line (line 292):
Code:
my $db_backupcmd = "$main::cfg{'CMD_MYSQLDUMP'} --add-drop-table -u\'$dbuser\' -p\'$dbpass\' \'$db_name\' >\'$db_backup_file\'";
to this one:
Code:
my $db_backupcmd = "$main::cfg{'CMD_MYSQLDUMP'} --add-drop-table --allow-keywords --quote-names -u\'$dbuser\' -p\'$dbpass\' \'$db_name\' >\'$db_backup_file\'";

Because Joomla (and maybe other webapps) use MySQL functions like "option" or "fulltext" as field name. And without the option " --allow-keywords --quote-names" your are not able to restore your DB. MySQL run into the function and did not interpret it as a field.

Greez BeNe
(This post was last modified: 08-09-2007 06:53 PM by BeNe.)
08-09-2007 06:39 PM
Visit this user's website Find all posts by this user
Thread Closed 


Messages In This Thread
Improve the mysqldump in the Backup - BeNe - 08-09-2007 06:39 PM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)