Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Plugins/Modules/Addons

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #211  
Old 14th April 2014, 17:30
Jorge QWASS Jorge QWASS is offline
Junior Member
 
Join Date: Apr 2012
Posts: 4
Thanks: 3
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by clttech View Post
When I tried to restore a db I get the following error
mysql: unknown option '-x'

I used this command backupres db mydata 2014-03-22 /

Any ideas?

I was able to restore the database by extracting that one database file and running the import command.

mysql -u root -p mydatabase < mydata.sql
I have just got the same error trying to recover some databases. So I have downloaded the last back-res.sh version just to recover with that script and it worked.

I you just want to fix the recovery part from the script without updating it with all new changes provided by Vrij, then update the code around line 547 with just a section of Vrij script (v.5.6):

Code:
            
for i in $arh ; do
  rdb=`echo $i | cut -d "-" -f2`
    mysql --user="$dbuser" --password="$dbpassword" --execute "CREATE DATABASE IF NOT EXISTS $rdb;"
    $BZIP2 -dc $BACKUPDIR/$YDATE-$MDATE/$i | $TAR -xvO | mysql --user="$dbuser" --password="$dbpassword" --da    tabase=$rdb
  done
echo -en "All restore jobs done!\nDatabase $2 restored to date $3!\n"
Add also this in variables section:

Code:
BZIP2=`which bzip2`                                     # name and location of bzip2
And the back-res.sh witl start to import databases.

I would like to thank you Vrij because I was having problems to fix that importing feature and he saved me. Thanks!

Last edited by Jorge QWASS; 15th April 2014 at 10:23.
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 16:54
how to restore Ispconfig from backup db na0lb Installation/Configuration 4 24th September 2008 08:51
Restore backup ISPConfig leeeonardo General 4 18th April 2007 20:21
Restore ispconfig complete backup statiic General 1 15th January 2007 10:32
Backup restore on ispconfig misterm Installation/Configuration 0 18th December 2005 23:32


All times are GMT +2. The time now is 14:36.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.