Creating a dump file
mysqldump -uroot -p -R -q --single-transaction -v dbname | gzip -q -9 - > /var/www/dbbackup/dbname.sql.gz
-R
Dump stored routines (functions and procedures) from the dumped databases. (Reference.)
-q
This option is useful for dumping large tables. It forces mysqldump to retrieve rows for a table from the server a row at a time rather than retrieving the entire row set and buffering it in memory before writing it out. (Reference.)
--single-transaction
This option issues a BEGIN
SQL statement before dumping data from the server. It is useful only with transactional tables such as InnoDB and BDB, because then it dumps the consistent state of the database at the time whenBEGIN
was issued without blocking any applications. (Reference.)
Extracting .gz file:
gzip -d dbname.sql.gz
Importing dump file
mysql -uDBUSER -pDBPASSWORD DBNAME < DBNAME.sql
Reblogged this on Gigable – Tech Blog.
hmmmm, pretty interesting
Woah this blog is fantastic i really like reading your posts. Stay up the good paintings! You understand, many people are looking around for this info, you could help them greatly.
Hello, Neat post. There is an issue along with your site in web explorer, could test this? IE still is the market chief and a good component of other people will omit your excellent writing due to this problem.
Its like you read my mind! You seem to know so much about this, like you wrote the book in it or something. I think that you could do with a few pics to drive the message home a little bit, but instead of that, this is wonderful blog. A fantastic read. I will definitely be back.
I just want to say I’m beginner to weblog and honestly enjoyed this blog site. Almost certainly I’m going to bookmark your blog post . You certainly have impressive articles and reviews. Many thanks for sharing with us your web site.
hello!,I like your writing very much! share we communicate more about your article on AOL? I need an expert on this area to solve my problem. Maybe that’s you! Looking forward to see you.
naturally like your web site but you have to check the spelling on quite a few of your posts. Many of them are rife with spelling problems and I find it very bothersome to tell the truth nevertheless I’ll definitely come back again.
Regards for this wondrous post, I am glad I discovered this internet site on yahoo.