Martin2k Forums

Board index Digital Media Website Design

Downloading Mysql Database

Website design and development. Perhaps the fastest changing media industry on here. Topics include website design, HTML, CSS, PHP and Javascript development... a lot more too!

Downloading Mysql Database

Postby Missfostret_Tellus » Wed Oct 14, 2009 10:27 pm

How to backup a huge database that time out in Phpmyadmin.
I don't wan to run some putty ssh shit on linux through a console. I want a simple tool for windows with an GUI.
Is it possible to Upload a php-script via that downloads the DB to the ftp-server for later retrieval?
Image SVART DÖDSMETALL Image
User avatar
Missfostret_Tellus
Level 2
 
Posts: 647
Joined: Tue Oct 13, 2009 12:21 am
Location: Svitjod
Medals: 1
Flug Collaboration (1)

Re: Downloading Mysql Database

Postby Martin Allen » Wed Oct 14, 2009 10:35 pm

What I did for the old forum was to download 10,000 rows at a time from the largest table. As it would not work any other way.
Martin Allen
Administrator
 
Posts: 325
Joined: Mon Oct 12, 2009 9:47 pm
Location: West Sussex, England
Medals: 1
6 Star (1)

Re: Downloading Mysql Database

Postby Missfostret_Tellus » Wed Oct 14, 2009 11:03 pm

Yes, but we are talking about a huge database here, not just a few hundred megabytes.
It has to be automated somehow.
Image SVART DÖDSMETALL Image
User avatar
Missfostret_Tellus
Level 2
 
Posts: 647
Joined: Tue Oct 13, 2009 12:21 am
Location: Svitjod
Medals: 1
Flug Collaboration (1)

Re: Downloading Mysql Database

Postby voidSkipper » Thu Oct 15, 2009 1:54 am

If it's timing out on the script that is converting the rows to text, you can temporarily hack around it by putting a line in the loop in phpmyadmin that affects the timeout counter of php.ini. This will cause the running timer to reset and prevent the script ever timing out.

Obviously you'll want to remove it afterwards.

The last time I used this method was in order to parse a very large json feed (120mb), and the specific line of code I used was "ini_set('max_execution_time', 3600);" where 3600 was the current execution time in my php.ini, at the end of the while loop that was traversing the feed.
(freespace2pilot was 'ere)
User avatar
voidSkipper
Level 1
 
Posts: 378
Joined: Tue Oct 13, 2009 3:27 pm
Location: South Australia
Medals: 1
6 Star (1)

Re: Downloading Mysql Database

Postby Missfostret_Tellus » Thu Oct 15, 2009 3:00 am

Freespace, I don't have access to the php.ini files nor the Phpmyadmin files.
I just have access to phpmyadmin through the Hosting company.
Image SVART DÖDSMETALL Image
User avatar
Missfostret_Tellus
Level 2
 
Posts: 647
Joined: Tue Oct 13, 2009 12:21 am
Location: Svitjod
Medals: 1
Flug Collaboration (1)

Re: Downloading Mysql Database

Postby voidSkipper » Thu Oct 15, 2009 4:58 am

Oh yuck, shared hosting.

I have never really dealt with a hosting environment where I didn't have access to the timeout, but this article seems to have some pointers. It would be really easy if you can get SSH access, but if you can't you might have to look into those migration scripts it mentions.

EDIT: Yeah, didn't read that you didn't want to fiddle with SSH. This looks promising.
(freespace2pilot was 'ere)
User avatar
voidSkipper
Level 1
 
Posts: 378
Joined: Tue Oct 13, 2009 3:27 pm
Location: South Australia
Medals: 1
6 Star (1)

Re: Downloading Mysql Database

Postby Missfostret_Tellus » Mon Nov 09, 2009 9:27 am

That looks promising. I'll try it. Thanks.
Image SVART DÖDSMETALL Image
User avatar
Missfostret_Tellus
Level 2
 
Posts: 647
Joined: Tue Oct 13, 2009 12:21 am
Location: Svitjod
Medals: 1
Flug Collaboration (1)


Return to Website Design

Who is online

Users browsing this forum: No registered users and 1 guest

cron