![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to break mysql dump sql file | learnbash | Shell Programming and Scripting | 2 | 05-14-2008 05:39 AM |
| Dump and restore command usage ?? | vikas027 | Red Hat | 2 | 05-04-2008 10:53 PM |
| Connecting to remote servers | rdbooth | Shell Programming and Scripting | 1 | 11-11-2003 04:57 PM |
| restore dump - help | sankera | UNIX for Dummies Questions & Answers | 2 | 07-09-2003 02:19 PM |
| Linux/Unix/PHP/MySQL & servers? | kolton | UNIX for Dummies Questions & Answers | 5 | 04-10-2001 11:05 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
restore mysql dump file in many remote servers?
Hi all,
I want to restore DB file in many mysql servers, i already using script for sending the dumpfile in all servers, but it's just annoying if i have to restore the dumpfile in all servers, i want just execute 1 script, and will restore in all remote mysql servers. I make script but not working, im sure my logics it's not correct Hope somebody can help me. Thanks. |
|
||||
|
Quote:
#!/bin/sh export PATH=$PATH:/home/mysql/bin jam=`date +%d%b%y` mysqldump --database testdb -u root --password=password > /home/cabang/testdb-$jam.dmp cd /home/cabang tar zcfv jasper-$jam.tgz testdb-$jam.dmp #Ftp for all branch #MDN ftp -n 192.168.4.25 <<! quote user admin quote pass password bin prompt mput testdb-$jam.tgz quit #restore to mdn script # Seems that this script wont work, coz, now im working in remote server #just stop in ssh remote only ssh 192.168.4.25 cd /home/admin tar zxfv testdb-$jam.tgz cd /home/mysql/mysql --database testdbmdn -u root --password < /home/admin/testdb-$jam.dmp exit #PLB ftp -n 192.168.5.25 <<! quote user admin quote pass password bin prompt mput testdb-$jam.tgz quit #restore to mdn script # Seems that this script wont work, coz, now im working in remote server ssh 192.168.4.25 cd /home/admin tar zxfv testdb-$jam.tgz cd /home/mysql/mysql --database testdbplb -u root --password < /home/admin/testdb-$jam.dmp exit ...... ...... |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|