View Single Post
  #114  
Old 12th May 2011, 17:40
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 932
Thanks: 16
Thanked 262 Times in 208 Posts
Default

Quote:
Originally Posted by cpaun View Post
Thank you for suggestion, do you have any HOWTO steps for that. I'm sure that it is many users will like to have an automatic backup and restore module.


Thanks,
I just meant the back-res script uses mysqldump without the --hex-blob and --quote-names (-Q) command line options.

So i would change
Code:
    ### Starting database dumps
    for i in `mysql -u$dbuser -p$dbpassword -Bse 'show databases'`; do
	log "Starting mysqldump $i"
	`mysqldump -u$dbuser -p$dbpassword $i --allow-keywords --comments=false --add-drop-table > $tmpdir/db-$i-$FDATE.sql`
	$TAR $ARG $BACKUPDIR/$MDATE/db-$i-$FDATE.tar.bz2 -C $tmpdir db-$i-$FDATE.sql
	rm -rf $tmpdir/db-$i-$FDATE.sql
	log "Dump OK. $i database saved OK!"
    done
to

Code:
    ### Starting database dumps
    for i in `mysql -u$dbuser -p$dbpassword -Bse 'show databases'`; do
	log "Starting mysqldump $i"
	`mysqldump -u$dbuser -p$dbpassword $i --allow-keywords --comments=false --add-drop-table --hex-blob --quote-names > $tmpdir/db-$i-$FDATE.sql`
	$TAR $ARG $BACKUPDIR/$MDATE/db-$i-$FDATE.tar.bz2 -C $tmpdir db-$i-$FDATE.sql
	rm -rf $tmpdir/db-$i-$FDATE.sql
	log "Dump OK. $i database saved OK!"
    done
Reply With Quote