dien thoai di dong , dau gia , the gioi smartphone , download game mobile , smartphone , tang truong , khoa hoc cong nghe thong cong , mua ban sim , Smartphone gia re , cong nghe tuong lai , cong nghe 360 , giai tri guongmat.org , su kien trong ngay , thoi trang hi tech , thong tin 360 , may tinh bang , perfect body , kasuman.com , gia vang hom nay , tin tuc an toan , kinh te viet nam , xay dung viet nam , thoi trang , thoi trang , phu nu viet nam , tin tuc moi online , dich vu bao ve viet nam , bao ve viet nam , cong ty bao ve viet nam , tin tuc moi online , giai tri 24h , tin tuc 24h


 16 Feb 2011 @ 1:29 PM 

Pretty straightforward

To compress mysqldump output :

mysqldump -uroot -psome_password db_name| gzip -c > db_name.gz

or alternatively, to compress it to a file on another host

mysqldump -uroot -psome_password dbname | gzip -c | ssh user@host -p22 'cat > /root/db_name.sql.gz'

To restore a database from a compressed file

gunzip < db_name.gz | mysql -uroot -psome_password db_name
Posted By: Zayin
Last Edit: 18 Feb 2011 @ 09:34 AM

EmailPermalink
Tags
Categories: linux, mysql


 

Responses to this post » (2 Total)

 
  1. zayinkrige says:

    New Blog Post -> Gzip mysqldump output and gunzip it for import – http://www.zayinkrige.com/gzip-mysqldump

  2. Yossi says:

    That’s awesome, thanks !

Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


 Last 50 Posts
 Back
Change Theme...
  • Users » 1
  • Posts/Pages » 40
  • Comments » 73
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

Links



    No Child Pages.

Portfolio



    No Child Pages.