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

BeNe
Moderator
*****


Posts: 2,941
Group: Moderators
Joined: Jan 2007
Status: Offline
Reputation: 41
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

[Image: ispcpsw.png]
Ein Betriebssystem ist immer nur so gut und sicher wie der Administrator der es verwaltet.
Wie gut der Administrator jedoch seine Fähigkeiten ausspielen kann, legt das Betriebssystem fest.
-> Linux rulZ!

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
Zothos Offline
Administrator
*******
Administrators

Zothos
Administrator
*******
Administrators


Posts: 718
Group: Administrators
Joined: Feb 2007
Status: Offline
Reputation: 10
Post: #2
RE: Improve the mysqldump in the Backup
+1 for getting this into the svn Tongue

Real programmers don't comment their code - it was hard to write, it should be hard to understand

OS : Gentoo 32bit Stage1
ispCP Version : RC4
Mods : Dovecot | Pure-ftpd

No Support via PM - Payed Support via request
08-10-2007 03:01 AM
Find all posts by this user
raphael Offline
Member
****
Dev Team

raphael
Member
****
Dev Team


Posts: 474
Group: Dev Team
Joined: Apr 2007
Status: Offline
Reputation: 8
Post: #3
RE: Improve the mysqldump in the Backup
will add on my next commit

YaHost Me | Text Link Ads | my Debian repository | Donate! | No OOXML! | Project HoneyPot | ... and more
Quote:This is Linux land. In silent nights you can hear the Windows machines rebooting.
If you want to be helped, don't PM me but post in the forums | If you want private support PM me and we'll discuss the price
08-10-2007 08:27 AM
Visit this user's website Find all posts by this user
BioALIEN Offline
Junior Member
**
Graph Team

BioALIEN
Junior Member
**
Graph Team


Posts: 238
Group: Graph Team
Joined: Feb 2007
Status: Offline
Reputation: 0
Post: #4
RE: Improve the mysqldump in the Backup
Raphael, update this thread or close it once you've committed this so we all know it's resolved Smile

BioALIEN
OS: Debian 4.0 Etch
ispCP Build: RC3 r953 - 28.12.07
Mods: AWStats dynamic
08-15-2007 07:16 PM
Find all posts by this user
raphael Offline
Member
****
Dev Team

raphael
Member
****
Dev Team


Posts: 474
Group: Dev Team
Joined: Apr 2007
Status: Offline
Reputation: 8
Post: #5
RE: Improve the mysqldump in the Backup
already commited... and I can't edit posts so BeNe or a mod will have to do it

YaHost Me | Text Link Ads | my Debian repository | Donate! | No OOXML! | Project HoneyPot | ... and more
Quote:This is Linux land. In silent nights you can hear the Windows machines rebooting.
If you want to be helped, don't PM me but post in the forums | If you want private support PM me and we'll discuss the price
08-16-2007 02:47 AM
Visit this user's website Find all posts by this user
Thread Closed  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this thread |

Forum Jump:

| All rights reserved : isp-control.net |