PDA

View Full Version : Back up your db, and have seperate source files!


Gonkers
04-13-2004, 05:44 AM
I'm zipping this file for everyone to have.

there are 2 files (actually 3, but readme.txt does not count)

1) backup.bat

Does just that, backs up your server's database. Then it will exit after it's finished.

2) sqlfull.bat

Will create a folder eqemusource in your C:\ drive and then put all of your source files from database into that folder. Then it will exit after it's finished. What I means by all of your source files, is that it seperates all your db sources 1 by 1. so you'll end up with a folder with all of your db sources..like accounts, characters, npc's..exct.

If you want to learn from it, right click and click edit.

http://www.geocities.com/blisto_games/backup.zip

right click, save file as.

themushygod
04-13-2004, 11:28 AM
well i never had any problems with just making a complete copy of the mysql/data folder then if i botch a db i just go find it in the copy and paste it back over the now broken one

saved me more then once

smogo
04-13-2004, 11:43 AM
copy and restore work fine, EXCEPT :
- if u use other filesystem than InnoDB (Mysql storing to files)
- if u change version

Also, just a tip :
it's sometimes a good idea to use --complete-insert when dumping, especially if no table drop/create. This allows to reimport data to database when table column have been added/moved

np, that was just a good idea to point out backup question and provide scripts. Thanks Gonkers :)[/img]

Gonkers
04-14-2004, 06:26 AM
well i never had any problems with just making a complete copy of the mysql/data folder then if i botch a db i just go find it in the copy and paste it back over the now broken one

saved me more then once

Have no idea what you mean, can you explain future please :).

samandhi
04-14-2004, 09:02 AM
What he is saying is; if you browse your files on your computer you should be able to go to c:\mysql\data (assuming you installed MySQL in the default directory) and simply copy the entire directory and paste it somewhere else. That way, when/if you mess something up, you have a working backup that you can simply copy from the other location BACK to \mysql\data to overwrite the broken parts of that directory (read your DB).....

Gonkers
04-14-2004, 05:27 PM
ah I see. I find it easier to just backup the whole sql file instead of copying and pasting a folder. I understand what you mean though :).