[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
ClanKiller.com - View topic - PhpMySqlDump
It is currently Sun Nov 24, 2024 6:19 am



Reply to topic  [ 8 posts ] 
PhpMySqlDump 
Author Message
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16662
Location: On a slope
Reply with quote
Post PhpMySqlDump
I wrote a script in php that will take your supplied credentials (servername, username, password, database name) and then automagically get all the tables, let you select the ones you want dumped, then dump them all via ajax into sql files using mysqldump. This is mainly meant for databases that are so big that dumping them all at once via phpmyadmin or something doesn't work. You can then download the sql files for each table and import them individually, or merge them if you feel inclined.

This is currently version 0.1a. There are no doubt bugs in here, but I tested it both locally and in my web space and it works as far as I can tell.

There are a few caveats
1. I do rapid-fire AJAX requests... from Firebug, it looks like the requests are getting stuck in a firing state. I actually do get returns, though, so it's possible that it's a problem with Firebug and not anything actually wrong with the script.
2. This is only tested in Firefox. It may not work in other browsers... but it should. I'll test it more later.
3. Table dumps are done sequentially. IE, one table dumps until it's done, then the next one goes. I coded it with the idea of simultaneously dumping multiple tables, so I'll be adding that functionality later. That should significantly reduce execution time.
4. To keep everything in a single file, I put the css and javascript into the php class. That makes for some dirty sections of code, but it keeps the whole thing confined to a single script. I think that is a worthy trade off and shouldn't affect anyone but those people interested in altering it.
5. This requires php5. It will not work on older version of php.


You do not have the required permissions to view the files attached to this post.

_________________
They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.


Tue Apr 20, 2010 1:45 pm
Profile WWW
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16662
Location: On a slope
Reply with quote
Post Re: MySQL dump script
updated to version 0.2

changelog:
21 April 2010
Added simultaneous dumping of 3 tables
Changed name of script
Altered writing to update table to be synchronous so simultaneous writes don't lock the browser up
On successful dump, the table name in the "tables to dump" table now becomes the download link
If a second dump request is made after a table was successfully dumped, the table parser strips off the previous link
Any existing file is now unlinked before being redumped
Progress Messages dialog improved
Incremented version to v0.2


You do not have the required permissions to view the files attached to this post.

_________________
They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.


Wed Apr 21, 2010 8:24 am
Profile WWW
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16662
Location: On a slope
Reply with quote
Post Re: PhpMySqlDump
updated version 0.3

changelog:
Added scrolling to progress messages
Clear progress messages every time dump is clicked
On file dump failure, unlink any existing file
Added gzip support and detection


You do not have the required permissions to view the files attached to this post.

_________________
They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.


Fri Apr 23, 2010 9:20 am
Profile WWW
Minor Diety
User avatar

Joined: Mon Mar 31, 2003 7:23 am
Posts: 14892
Location: behind a good glass of Duvel
Reply with quote
Post Re: PhpMySqlDump
Every other word of your previous 3 posts means nothing to me, H00M4N!!

(ie: has no idea what you're saying)

_________________
"I find a Burger Tank in this place? I'm-a be a one-man cheeseburger apocalypse."

- Coach


Sat Apr 24, 2010 1:21 pm
Profile
Stranger
User avatar

Joined: Sat Apr 12, 2003 1:14 pm
Posts: 6362
Location: Estonia
Reply with quote
Post Re: PhpMySqlDump
Hushhh, Satis is skynets henchman. :D

_________________
When someone asks how rich you are, quote Rinox " I don't even have a rusty nail to scratch my butt with...!"

Be well or Get Help!!


Sun Apr 25, 2010 1:53 am
Profile
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16662
Location: On a slope
Reply with quote
Post Re: PhpMySqlDump
heh...this thread may not be meant for you then. :roll:

For people that build websites that do stuff (ie, not static text), they usually use php. To store data, they usually put it in a database, which is usually mySql. In some cases, you database gets so big (so much data gets in it in the form of forum posts, content, comments, etc) that you can no longer back it up normally. When you try, it times out and you get nothing. This is obviously a problem.

What this script does it allow you to back up your database by dumping out one table of data at a time and doing so automatically. You just upload it to your web space, browse to it, fill out a few fields, and the rest is auto-magical. :roll:

I actually wrote this because I got into a discussion about the problem and possible solutions on my web provider's forums. I decided to leverage my knowledge of php and javascript to make something fast, powerful and adaptable. Bam! A script is born!

Questions? Comments? Bank account numbers?

_________________
They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.


Sun Apr 25, 2010 1:12 pm
Profile WWW
Stranger
User avatar

Joined: Sat Apr 12, 2003 1:14 pm
Posts: 6362
Location: Estonia
Reply with quote
Post Re: PhpMySqlDump

_________________
When someone asks how rich you are, quote Rinox " I don't even have a rusty nail to scratch my butt with...!"

Be well or Get Help!!


Sun Apr 25, 2010 3:41 pm
Profile
Minor Diety
User avatar

Joined: Mon Mar 31, 2003 7:23 am
Posts: 14892
Location: behind a good glass of Duvel
Reply with quote
Post Re: PhpMySqlDump
So...you're gonna sell the script to MS and become the new Bill Gates/Steve Allen? :wink:

I'll have your social security number too if you're offering anyway.

_________________
"I find a Burger Tank in this place? I'm-a be a one-man cheeseburger apocalypse."

- Coach


Mon Apr 26, 2010 1:25 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.