..\bin\mysqldump.exe --user=root --password=abc123! --routines --create-options --single-transaction --skip-add-locks --skip-lock-tables --default-character-set=utf8 database table
This is my personal blog to keep track of all those sysadmin items that keep recurring in my life that I can never remember.
Monday, November 16, 2009
MySQL Backup
Ever had to backup a MySQL database running on Windows. Well this was my first time. I have a pretty active database that grows to about 70GB over the course of a month. I wanted to perform the backup using a MySQL tool. I suppose I could have just run a Windows backup, but that wouldn't be much fun. So here is what I ended up doing. I ran the below command from within the folder I wanted to land the dump files in. For instance I wanted my dump files to reside in C:\mysql\backup so I ran the below command from within this folder I created.
..\bin\mysqldump.exe --user=root --password=abc123! --routines --create-options --single-transaction --skip-add-locks --skip-lock-tables --default-character-set=utf8 database table bzip2.exe > database_table.sql.bz2
..\bin\mysqldump.exe --user=root --password=abc123! --routines --create-options --single-transaction --skip-add-locks --skip-lock-tables --default-character-set=utf8 database table
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment