DragonPrime - LoGD Resource Community

Coding Support => Coding Support Desk => Topic started by: gilgalad on April 16, 2005, 02:58:47 PM



Title: Big db backup
Post by: gilgalad 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...


Title: Re:Big db backup
Post by: Freeze 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.


Title: Re:Big db backup
Post by: Lightbringer 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


Title: Re:Big db backup
Post by: Turock 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.


Title: Re:Big db backup
Post by: Sichae 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...


Title: Re:Big db backup
Post by: Freeze 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?


Title: Re:Big db backup
Post by: Sichae 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. :P


Title: Re:Big db backup
Post by: Freeze on April 17, 2005, 06:13:33 PM
/me is afraid to try it.

But what does it do to the accounts?


Title: Re:Big db backup
Post by: Sichae 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.


Title: Re:Big db backup
Post by: Turock 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.


Title: Re:Big db backup
Post by: Kendaer 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.



Title: Re:Big db backup
Post by: XChrisX 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... ;)


Title: Re:Big db backup
Post by: Turock on April 18, 2005, 09:55:44 PM
You could take it one step further and do:
Code:
"UPDATE accounts SET output='', allowednavs='', restorepage=''";


Title: Re:Big db backup
Post by: Freeze 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=''"


Title: Re:Big db backup
Post by: Turock 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='';


Title: Re:Big db backup
Post by: Freeze on April 24, 2005, 01:57:23 PM
that worked


Title: Re:Big db backup
Post by: CortalUX on April 30, 2005, 09:16:19 AM
Ok, I've got a lot of time this week, and forum is done apart from posting :D - so I'm going to make an LotGD backup module, with the option to select which modules to back up.

© 2019 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines