Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jul 2001
Posts: 1,157
Likes: 82
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,157
Likes: 82
From...
https://www.ubbdev.com/forum/showflat.php/Cat/0/Number/100700/an/0/page/0#100700

I was having timeout problems importing LARGE MySQL Dumps, untill i came across this neat util...

Ive attached the file to this thread incase the above link goes bad.

cheers!

...
... the php script
...

via MySQL Tool [no timeout]
http://www.invisionpower.com/documentation/showdoc.php?page=112&p=111
If you do not have access to SSH and when you use phpMyAdmin you are having problems due to php timing out this script will restore your database.

>> Download Here

The script is capable of both backing up databases and restoring them by part (refreshing every so often) so as to avoid time out problems. It is theoretically possible to restore or backup databases of any size using it.

The file readme.txt contains the information you will require for setting the script up on your host.

Still timing out?
If you are still getting time out problems try forcing a lower execution time between refreshes by editing "var $maximum_time = 0;" on line 26 changing 0 to the number of seconds you wish the script to execute (work up from 15)

I get an error after submitting the database settings
You are either using the wrong details or your MySQL server is offline. Consult your hosting provider for more information, quoting the error the script gives you.

Getting the duplicate entry error when restoring?
This is always caused when you are attempting to restore a backup over a database that already has data in it. Try restoring to an empty database instead.
Attachments
116768-mysql_tool.zip (0 Bytes, 290 downloads)


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Sponsored Links
Joined: Jul 2001
Posts: 1,157
Likes: 82
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,157
Likes: 82
The first one should work for most platforms, but here is another that works just as well - but its more configurable, and also more picky

your mileage will vary

...

BigDump: Staggered MySQL Dump Importer
http://www.ozerov.de/bigdump.php
Staggered import of large and very large MySQL Dumps (like phpMyAdmin 2.x Dumps) even through the web-servers with hard runtime limit and those in safe mode. The script executes only a small part of the huge dump and restarts itself. The next session starts where the last was stopped.

This program is for you if you want to restore the very large backup of your mySQL database (or a part of it) into the new or the same mySQL database. Also if you can't access the server shell and you can't import the dump using phpMyAdmin or any other scripts due to hard memory resp. runtime limit of the web-server.

Download it here...
BigDump ver. 0.19b (beta) - http://www.ozerov.de/bigdump.zip
(file is also attached to this thread)
Attachments
116770-BigDump0.19b.zip (0 Bytes, 50 downloads)


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Apr 2002
Posts: 102
Journeyman
Journeyman
Offline
Joined: Apr 2002
Posts: 102
Haven't tried it out yet, but I was wondering if something like this existed

Thanks

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Wow thanks - these will come in handy.

Joined: Mar 2002
Posts: 36
User
User
Offline
Joined: Mar 2002
Posts: 36
[]JoshPet said:
Wow thanks - these will come in handy. [/]

You guys should try this, it works absolutely great but external access to the database is needed.
http://www.mysqlfront.de/download.html

Sponsored Links
Joined: Feb 2001
Posts: 34
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 34
Holy CRAP!

RTeam, you aren't kidding.

That is EXACTLY what I have needed in my life. I've been searching for reasons why I can't import an sql file bigger than 2 megs using phpadmin. How many boards' tables have a 'posts' table under 2 megs?

I was even able to highlight every table, and export them from my live site to my local database in a super batch process. WOW!

THANK YOU for the link!

I nominate this as LINK OF THE YEAR

Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
id242, You Rawk!


- Custom Web Development
http://www.JCSWebDev.com
Joined: Feb 2001
Posts: 169
Member
Member
Offline
Joined: Feb 2001
Posts: 169
Guys, I have an HUGE problem. Recently I had several problems with w3t_posts reported as "in use", a few days ago I tried an update to 6.5 but the update failed in the altertabe phase on w3t_posts as reported in this message:

http://www.ubbcentral.com/boards/showflat.php/Cat/0/Number/38762/an/0/page/1#38762

The problem is 100% related to a sort of corruption in my database.

Now I got a backup of the database (in .SQL format) from my server admin. The file itself is ok and I can open it with a text editor but I can't manage to do anything else.

I tried to import it using MySQL-Front but it stop douring the process.

The question is: Is there a tool to check and fix probles in an .SQL file BEFORE imporing it in the SQL server ?

Joined: Feb 2001
Posts: 169
Member
Member
Offline
Joined: Feb 2001
Posts: 169
Nobody ?

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
no tool I know up will fix the file.

Sponsored Links
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Do you have a backup of your w3t_Posts table before it corrupted? If not, you may be screwed unfortunately, and will have to start with a newly created table.

This is precisely why I backup weekly now

Joined: Feb 2001
Posts: 169
Member
Member
Offline
Joined: Feb 2001
Posts: 169
[]Twisty said:
Do you have a backup of your w3t_Posts table before it corrupted?[/]

No, I don't have any recent backup

[]
If not, you may be screwed unfortunately, and will have to start with a newly created table.[/]

But are you sure ?
I can manage to open the file with a text editor and see all posts... why can't I fix it in any way ?

Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
[]Rutto said:
why can't I fix it in any way ? [/]

Create a new database (just for testing) and see if you can successfully import just that one table into it.

1) If you can't (and we know the REPAIR TABLE command hasn't worked), then it may be seriously damaged beyond repair. It's difficult to know how fixable it is without actually taking a look at it.

2) If you can import it, then this means that you'll have to DROP the current w3t_Posts table from your main database first *before* importing the backup.

Joined: Feb 2001
Posts: 169
Member
Member
Offline
Joined: Feb 2001
Posts: 169
Hi guys, problem solved

here my feedback, hope it could be useful for someone:

After I understand that the issue was related to w3t_posts I opened the .sql with a text editor, deleted everything before w3t_posts and saved it as "PRE_W3T_POSTS.SQL", than open again the original .sql, removed everithing from the beginning to the end of w3t_posts and saved it as "POST_W3T_POSTS.SQL". Opened again and removed everything before and after w3t_posts and saved it as "W3T_POSTS.SQL".

After I created those 3 files used MySQL-Front to import all in my database. Obviously I got a problem with the w3t_posts one but MySQL-Front recorded a .err file with all operations failed.
I opened the .err and copied row by row and executed them in MySQL-Front...

DONE ! Now I have a perfect database again !


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)