Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Closed Thread
importing mysql via ssh, how to determine progress?
Old 12-16-2009, 02:00 PM importing mysql via ssh, how to determine progress?
Experienced Talker

Posts: 49
Trades: 0
Hi,
importing a 120mb phpbb mysql file.

can't use bigdump as using nginx give 504 timeout errors.

using the following via command line

mysql -uUSERNAME –pPASSWORD DATABASENAME < MYDATABASE.sql
For example, if my username was "silly," my password "computer," my database name "MyDB" and my file name "MyDBBack.sql," I would type:


but it just goes blank and doesnt give me any progress

how can I know when its finished
dimensio is offline
View Public Profile
 
 
Register now for full access!
Old 12-16-2009, 02:53 PM Re: importing mysql via ssh, how to determine progress?
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
It's normal that it don't gives you any progress.
You know it's finished when you have a cursor again.
As long as you don't have any errors, then everything is fine.

Normally, a 120 Mb dump should not take more than 3 to 5 minutes, on a decent server.
What you can do if you want to be explicitly told when the restore is finished, you can concatenate a command to be executed just after the import is finished:
Code:
mysql -uUSERNAME –pPASSWORD DATABASENAME < MYDATABASE.sql;clear;echo "Import completed";
This will blank the screen, and add an "import completed" message in the terminal.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
View Public Profile Visit tripy's homepage!
 
Old 12-24-2009, 03:55 AM Re: importing mysql via ssh, how to determine progress?
joebert's Avatar
Novice Talker

Posts: 5
Name: joe
Location: Clearwater, FL USA
Trades: 0
Might be worth breaking the file up into parts.

Pull all of the table definitions into one file, you should be able to execute that in a few seconds and get everything setup.

Then, split the data into multiple files with an equal number of inserts. If you're lucky each insert will be on a new line making this split as simple as a few head|tail statements.

If you've split the file into 10 equal parts and the first part takes X minutes to finish, you should be able to guage how long the rest of it will take so you can do something else while a script that imports each section sequentially runs.

The script is basically just the same line you've used for each section of the data, then instead of running your line from the terminal you execute your script and walk away.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
joebert is offline
View Public Profile Visit joebert's homepage!
 
Closed Thread     « Reply to importing mysql via ssh, how to determine progress?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.37013 seconds with 12 queries