Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > Management Articles
Restore any size SQL backup using phpMyAdmin
Zylantex
Join Date: Sep 2009
Posts: 170

 

France
Show Printable Version Email this Page Subscription
Zylantex Zylantex is offline 08-18-2011, 10:00 PM

The biggest problem with restoring a sql backup is hitting the php timeout wall.

There is a way around this and it's incredibly simple.

You just need a tool to break your backup into intelligent chunks which are small enough not to timeout during the restore process.

This is done using SQLDumpSplitter 2.

The procedure is simple:

1. Create a holding directory called say "Split Files" on your desktop.
2. Unzip and run SqlDumpSplitter.exe
3. Select your backup file
4. Set the maximum file size you want to work with say 10240 KB ( I have used 30000 KB sucessfully)
5. Set the target directory that you created in Step 1
6. Click the word Execute.

The program will create a sub folder in your target directory called SQLDumpSplitterResult.

The split files will be found there one of which will have a filename ending in DataStructure.sql.

The rest will be named the same as your original backup file with a numerical sequence identifier added.

Now you are ready to use phpMyAdmin to import your backup.

I would strongly advise against attempting this process unless you are comfortable with phpMyAdmin.

Import the file ending in DataStructure.sql first as this recreates your file structure, tables etc.

Import the other files in the directory one at a time in numerical order.

Don't be impatient as the process is limited by your upload speed.

If for any reason the process does timeout simply restart the whole process and pick a smaller file size in Step 4.

You the must recommence the phpMyAdmin process completely from scratch including the import of the first file ending in DataStructure.sql

That's about all there is to it.

Regards,

Zylantex


*** Full credit must be given to Philip Lehmann-B?hm http://www.PhilipLB.de who wrote this great tool. ***
Attached Images
File Type: jpg SQLSplitter2.JPG (35.1 KB, 0 views)
Reply With Quote
  #2  
Old 12-29-2011, 10:08 AM
pipsteal pipsteal is offline
 
Join Date: Feb 2011
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi this is bala, when i m try to do this same procedure, it ll send some error as follows.

Error
SQL query:

INSERT INTO `newtbl_action`
VALUES ( 1, 1, 3, 'Content', 'view', 'View' ) , ( 2, 1, 3, 'Content', 'edit', 'EditPage' ) , ( 3, 1, 3, 'Content', 'editcontent', 'EditContent' ) , ( 4, 1, 3, 'Content', 'configcontent', 'ConfigContent' ) , ( 5, 1, 3, 'Content', 'addcontent', 'AddNode' ) , ( 6, 1, 3, 'Content', 'deletecontent', 'DeleteNode' ) , ( 7, 1, 3, 'Content', 'publish', 'PublishNode' ) , ( 8, 1, 3, 'Content', 'options', 'NodeOptions' ) , ( 9, 1, 3, 'Widget', 'viewwidget', 'View' ) , ( 10, 1, 3, 'Widget', 'configwidget', 'Config' ) , ( 11, 1, 3, 'Widget', 'configeditor', 'ConfigEditor' ) , ( 12, 1, 3, 'Widget', 'editwidget', 'Edit' ) , ( 13, 2, 3, 'BaseWidget', 'config', 'Config' ) , ( 14, 2, 3, 'BaseWidget', 'edit', 'Edit' ) , ( 15, 3, 3, 'Editor', 'switch', 'SwitchMode' ) , ( 16, 3, 3, 'Editor', 'tableoverlay', 'TableOverlay' ) , ( 17, 4, 3, 'List', 'list', 'List' ) , ( 18, 1, 3, 'Content', 'rate', 'Rate' ) ;


MySQL said:

#1062 - Duplicate entry '1' for key 'PRIMARY'

please give me some solution for this.. thanks
bala
Reply With Quote
  #3  
Old 12-30-2011, 09:42 AM
Zylantex Zylantex is offline
 
Join Date: Sep 2009
Location: France
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zylantex View Post
If for any reason the process does timeout simply restart the whole process and pick a smaller file size in Step 4.
That should sort it out for you as it drops an re-creates all the tables. Don't forget to make sure the forum is not in use. In particular make sure you are not using the forum yourself in another tab.
Reply With Quote
Reply

Thread Tools

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

Forum Jump


All times are GMT. The time now is 08:30 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03782 seconds
  • Memory Usage 2,225KB
  • Queries Executed 19 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (1)post_thanks_box_bit
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (1)postbit_attachment
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete