DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • November 19, 2018, 03:47:13 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: Big db backup  (Read 5749 times)
0 Members and 1 Guest are viewing this topic.
gilgalad
Guest
« on: April 16, 2005, 02:58:47 PM »

My server down but i ve been uploeded my backup files luckly... But the size of the backup is 11 mb. How can i send this big file to my phpmyadmin db...
Logged
Freeze
Guest
« Reply #1 on: April 16, 2005, 05:04:26 PM »

Break it up, and copy/paste it into the SQL box.

Break it up a places, before INSERT INTO.
Logged
Lightbringer
Member
Codemeister
****
Offline Offline

Posts: 267


Life's a lich and then you don't die...damn unlife


View Profile
« Reply #2 on: April 16, 2005, 09:08:24 PM »

That is the only real way unfortunately...

You must break it up...considering the limit is like 6MB...

Will take a little while - but the reward far outweighs the hassle
Logged

________________________ _____________________

Lightbringer
PHP/SQL/VB.NET/C#/AJAX Developer
Turock
Guest
« Reply #3 on: April 17, 2005, 04:21:40 PM »

In the future before doing your backups I would run:
Code:
"UPDATE accounts SET output='' WHERE 1;

This will cut the size of your backup down by huge amounts.
« Last Edit: April 17, 2005, 04:22:29 PM by Turock » Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #4 on: April 17, 2005, 04:45:55 PM »

Also, if you have petitions, ditch them...

Code:
TRUNCATE `petitions`
They hold a lot of information, that is not necessary really...
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Freeze
Guest
« Reply #5 on: April 17, 2005, 06:03:47 PM »

In the future before doing your backups I would run:
Code:
"UPDATE accounts SET output='' WHERE 1;

This will cut the size of your backup down by huge amounts.

What does this do?
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #6 on: April 17, 2005, 06:09:43 PM »

It should actually be:
Code:
UPDATE `accounts` SET output=''
output is where all of the page information is held.

If you go to Run Raw SQL, and type:
Code:
SELECT output FROM accounts LIMIT 1
You will see an entire page displayed, within the page. It is really cool looking. Tongue
« Last Edit: April 17, 2005, 06:11:05 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Freeze
Guest
« Reply #7 on: April 17, 2005, 06:13:33 PM »

* Lord Xander is afraid to try it.

But what does it do to the accounts?
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #8 on: April 17, 2005, 06:15:49 PM »

But what does it do to the accounts?

It will get rid of a LOT of extraneous information, that can regenerated in a short amount of time. It basically is all the HTML for a site.
« Last Edit: April 17, 2005, 06:16:09 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Turock
Guest
« Reply #9 on: April 17, 2005, 09:00:29 PM »

Nothing is lost by clearing the output field in the accounts.  When a player logs in the output field is written to the database anyways so any info that is saved there is just taking up space and adding size to the backup.
Logged
Kendaer
Guest
« Reply #10 on: April 18, 2005, 03:48:00 PM »

Not *quite* true.

IF a player gets a badnav, then that saved output is used in order to redisplay the last page they saw, so if you have any players in a badnav state when you take the db snapshot/clear the output field, then those players will be very badly stuck when they next try to log in.

Similarly, anyone who closes the browser rather than logging out via quit to fields, or the inn will have a similar problem and will not be able to navigate once they log back in.

Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #11 on: April 18, 2005, 09:30:32 PM »

for that the allowed navs should be reset, too

Code:
UPDATE accounts SET output = '', allowednavs = ''

maybe even "restorepage"... The will then all be redirected to your main village... But nothing else... Wink
Logged

Running for more than three years now:
Turock
Guest
« Reply #12 on: April 18, 2005, 09:55:44 PM »

You could take it one step further and do:
Code:
"UPDATE accounts SET output='', allowednavs='', restorepage=''";
« Last Edit: April 18, 2005, 09:56:16 PM by Turock » Logged
Freeze
Guest
« Reply #13 on: April 22, 2005, 07:32:42 PM »

Code:
"UPDATE accounts SET output='', allowednavs='', restorepage=''";

doesn't work for me.

Quote
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '"UPDATE accounts SET output='', allowednavs='', restorepage=''"
Logged
Turock
Guest
« Reply #14 on: April 22, 2005, 07:46:49 PM »

Looks like you have too many quotes in there.  Try this:
Code:
UPDATE accounts SET output='', allowednavs='', restorepage='';
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
50 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search