Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th March 2013, 17:57
skoena skoena is offline
Senior Member
 
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 421
Thanks: 77
Thanked 13 Times in 11 Posts
Send a message via MSN to skoena Send a message via Skype™ to skoena
Default Db's dumps in seperate files?

How to get a dump of all db's in seprate files?

I want to restore all db's on newly installed server.

Can somebody give exact codes to get this done via commandline?
Reply With Quote
Sponsored Links
  #2  
Old 6th March 2013, 02:24
tahunasky tahunasky is offline
Member
 
Join Date: Jul 2012
Location: Buenos Aires
Posts: 84
Thanks: 1
Thanked 8 Times in 8 Posts
Default

this is what i use.

mysqldump dbispconfig -u {MYSQLUSER} -p {MYSQLPASSWORD} > /tmp/dbispconfig.sql

replace {MYSQLUSER} with username and {MYSQLPASSWORD} with password.

Just do the same command for each database.

You can also do a dump/backup and restore from phpmyadmin, which is probably easier.

Last edited by tahunasky; 6th March 2013 at 02:30.
Reply With Quote
  #3  
Old 6th March 2013, 05:30
Parsec Parsec is offline
Member
 
Join Date: Jan 2013
Posts: 66
Thanks: 1
Thanked 9 Times in 8 Posts
 
Default

Or you could do them all at once if you have the root password for mysql

Code:
#!/bin/bash

cd /var/backup
for i in $(/usr/bin/mysql -uroot -p<your_root_password> -e 'show databases'|grep -v Database);

do
if ( test $i != information_schema )
then
/usr/bin/mysqldump -uroot -p<your_root_password> $i > ./$i.dump ;
fi
done
The just go to /var/backup and grab them (this assumes you have a /var/backup dir - if not change it to something else in the script.
Reply With Quote
The Following User Says Thank You to Parsec For This Useful Post:
JESUSSAVES (6th March 2013)
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
scriptdir and bindir in RKHUNTER stigge2000 Server Operation 6 21st December 2012 13:57
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 17:26
Debian 5.0 'hangs' GHz Installation/Configuration 5 1st October 2009 12:57
The system is currently updating the configuration files. warlock General 8 21st February 2009 18:15
Network questions regarding Ubuntu Server lubod Installation/Configuration 7 3rd January 2007 18:53


All times are GMT +2. The time now is 19:54.


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