vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How to import big SQL? (https://vborg.vbsupport.ru/showthread.php?t=99850)

sinoeu 11-01-2005 05:01 PM

How to import big SQL?
 
I'm changing my vbulletin3.07 to a new sharing hosting plan. So I backed up my database in using CPANEL of the old sever. Now je just don't know how to import this 300M sql file to my new sharing sever? I've tried some importing tool but always failed. Any successful experiences? :disappointed:

harmor19 11-01-2005 05:22 PM

Split it up.

after each statement is a semicolon eg.
[sql]CREATE TABLE `faq` (
`faqname` varchar(250) binary NOT NULL default '',
`faqparent` varchar(50) NOT NULL default '',
`displayorder` smallint(5) unsigned NOT NULL default '0',
`volatile` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`faqname`),
KEY `faqparent` (`faqparent`)
) TYPE=MyISAM;[/sql]
[sql]INSERT INTO `faq` VALUES (0x76625f666171, 'faqroot', 100, 1);[/sql]

Open your sql file in an edior (use wordpard instead of notepad because wordpad seperates the lines better or use an editor your like.)


cut about 600 lines and place it into another file named vb_1.sql then go cut another 600 lines and paste it into a file named vb_2.sql and so on... (make sure you end on a semiolon.)

Now upload the sql files in order.

I hope that helps.

Zachery 11-01-2005 05:28 PM

OR you can just use SSH and do it in about 30 seconds.

andrewrhs 11-05-2005 05:51 AM

what command line to use in SSH. I have tried SSH before but the character not correct. For example, the forum is utf-8 unicode but after the restore the character wasn't utf8. How to fix that?

Bellinis 11-05-2005 11:07 AM

I always use this nice little tool to upload a big database.
Takes you 1 minute to config and off you go!

http://www.ozerov.de/bigdump.php

Boofo 11-05-2005 11:48 AM

Quote:

Originally Posted by Bellinis
I always use this nice little tool to upload a big database.
Takes you 1 minute to config and off you go!

http://www.ozerov.de/bigdump.php

What the largest size you have uploaded with it and did you do it as a gz or sql file? ;)

Any special recommendations for the settings? ;)

Bellinis 11-05-2005 12:49 PM

Quote:

Originally Posted by Boofo
What the largest size you have uploaded with it and did you do it as a gz or sql file? ;)

Any special recommendations for the settings? ;)

My vbulletin database is 120mb (uncompressed), but bigger should be no problem at all.
I uploaded my database as gz file which was only 26mb or so.

Only recomendation:

* make sure you import in the correct database. ;)
* delete de dumbdir after the succesfull import or protect that directory using htaccess :)

Good luck.

Bellinis

noppid 11-06-2005 02:19 PM

<a href="http://www.vbwebmaster.com/forums/showthread.php?t=1183&highlight=backup" target="_blank">How to backup your forum with SSH and Cron</a>

dc3dreamer 11-07-2005 01:21 AM

Wow... I'm surprised no one has mentioned MySql Administrator. I have the same issues with my remotely hosted system, but there seems to be no limit to what you can do with this tool. It is free and from the MySql group:

http://www.mysql.com/products/tools/administrator/

Boofo 11-07-2005 04:49 AM

Quote:

Originally Posted by dc3dreamer
Wow... I'm surprised no one has mentioned MySql Administrator. I have the same issues with my remotely hosted system, but there seems to be no limit to what you can do with this tool. It is free and from the MySql group:

http://www.mysql.com/products/tools/administrator/

Don't you have to have server access for this? Some don't have that capability and must do it from their home computers.

Smitty 11-07-2005 05:37 AM

Telnet to your server.
Make an empty database named 'forum'.
cd to directory mysql file is in.

The following assumes:
Your mysql password is: XXXXXXXX
Your empty database is named: forum
The sql file you want to import is named: forum_bup.sql

mysql --password=XXXXXXXX forum < forum_bup.sql

attroll 11-07-2005 05:50 AM

Yes Telnet/SSH is the way to go. My database backup is over 200 meg and once I put the backup on the server and execute the restore command then it takes about 15 seconds or less to restore.

Smitty 11-07-2005 06:25 AM

Yup, and to backup it's the same, basically:

mysqldump --opt -c --password=XXXXXXXX -q -v forum > forum_bup-051106am.sql
gzip -v forum_bup-051106am.sql

Then FTP the ZIP file to another server. The key is to get a copy on another drive either within your server (RAID Level 1 - Mirroring) or on another server - Main cause of catestrophic, 'no warning' total data loss is drive failure.

jcr 11-07-2005 07:24 AM

Quote:

Originally Posted by Bellinis
I always use this nice little tool to upload a big database.
Takes you 1 minute to config and off you go!

http://www.ozerov.de/bigdump.php

This has also been the best solution for me. The largest database I have imported was 1,4 gb large.

Smitty 11-07-2005 08:05 AM

Mine only runs about 300 megabytes - So I'm a little guy.... I have attachments outside the database so that's a secondary backup issue. But - a nightly FTP offsite backup of both attachments and the main forum database can be done with a server cron script. I run freebsd and it's pretty simple.

Boofo 11-07-2005 09:19 PM

Quote:

Originally Posted by Smitty
Mine only runs about 3 megs - So I'm a little guy.... I have attachments outside the database so that's a secondary backup issue. But - a nightly FTP offsite backup of both attachments and the main forum database can be done with a server cron script. I run freebsd and it's pretty simple.

What do you mean off-site backup?

Smitty 11-07-2005 09:32 PM

A backup in a different location. For example, my host is a server farm in Texas. I back up my database every night to my home computer which is 'off site'. If anything happens to them or their server farm, the most I would lose would be a day of posts on my forums.

lanoix 11-13-2005 09:28 AM

Just to thank you for the bigdump script... Really usefull ;)


All times are GMT. The time now is 09:30 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01198 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete