The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 18, 2019, 01:32:42 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: dealing with ginormous SQL dump  (Read 3206 times)
jp29997
Rookie
**
Offline Offline

Posts: 13


View Profile
« on: June 05, 2007, 02:53:55 PM »

hello smart guys:

I have  515 mb sql dump   -  i can probably figure a way to open it manually and split it up (its got a lot of data i dont need to import) but is there a command line short cut to split this thing up semi-intelligently, you know like between blocks of statements?
Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #1 on: June 05, 2007, 03:02:59 PM »

I don't know of any simple commands, but some immediate ideas come to mind:

Can you select into another "temp" table that has precisely what you want, then dump that?
Is it a size of download problem? SSH to that box, store the SQL there, tar.gz it for the trip home

/p
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
jp29997
Rookie
**
Offline Offline

Posts: 13


View Profile
« Reply #2 on: June 05, 2007, 03:17:03 PM »

nah download is OK, I have it on my box, is mainly the pain of opening it - im moving this dump to a VPS, and i might as well edit it on my local machine before dumping it OR split it intelligently to make it easier to deal with as an iterative task

i can split it with a program like hjsplit for windows or split -b or split -l in linux and then clean it up, but i was hoping someone might have a little shell script or batch file that did this smarter like splitting it just before a sql file comment block

--
-- dumping...
--

no big deal i'll just futz with it, my specialty

or alternative anyone use a text editor that loves gigantic file? im using notepad++ which is pretty challenged by a file this size

edit: please dont suggest emacs :rofl:
« Last Edit: June 05, 2007, 03:19:36 PM by jp29997 » Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #3 on: June 05, 2007, 03:37:56 PM »

edit: please dont suggest emacs :rofl:

Fair enough. Use VI.  ROFLMAO
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!