View Full Version : how to backup a mysql database
Ho wcan i backup my Mysql database, :) , thx to read
Taborama
11-7-01, 10:29 AM
My question I think is sorta along the same lines:
I'll be creating a 7000 record MySQL database in the next couple months. Is there anyway I can periodically get a copy sent to me in say Access format? I'd like to do a personal backup of it a few times a year.
There's a utility program that comes with the MySQL distribution (from http://mysql.com) that does the job quite well.
You run this on your internet-connected PC and it stores a SQL command file on you local drive.
C:\mysql\bin\mysqldump.exe --host=hostname.com --user=username --add-drop-table -e -ppassword --tables --no-create-db --result-file=/path/backup.sql
I have this running from a .bat file that also renames the file with the current date and then adds to a .zip file. I then call the .bat file from the task manager in Windoze so i have a automatic daily back-up every day. I do this in the wee hours of the morning to avoid slowing down anyone else's access. My database is fairly small, only about a quarter-meg, so daily is not too much load.
Taborama
11-8-01, 10:35 AM
Thanks!! I started pulling that before I left for work this morning. Yeah, mines going to be about 30mb so I think a backup 1 a month will be plenty ;)
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.