|
mysql Àº ¹Ì·¯¸µÀ» ¸ñÀûÀ¸·Î ±âº»ÀûÀ¸·Î ¹ÙÀ̳ʸ® ·Î±×¸¦ ³²±ä´Ù.
·Î±×´Â µðºñ¿¡ ¾÷µ¥ÀÌÆ®¸¦ ¹ÌÄ¡´Â ¸ðµç Äõ¸®°¡ ½Ã°£°ú ÇÔ²² ÀúÀåµÈ´Ù..
mysql/var/localhost-bin.000001 ½ÄÀ¸·Î »ý±â¸ç µðºñ Àç½ÃÀ۽ÿ¡ ¼ýÀÚ°¡ Çϳª ´Ã¾î³´Ù.
ÆÄÀÏÀÌ Ä¿¼ ÀúÀåÇÏÁö ¾ÈÀ»·Á¸é my.cnf ¿¡¼ log-bin µÈºÎºÐÀ» ÁÖ¼® ó¸® ÇØ¾ß µÇ°í
ÆÄÀÏ À§Ä¡¸¦ ¹Ù²Ù°í ½Í´Ù¸é log-bin = /usr/~~/file ó·³ ÁÖ¼Ò¸¦ Àû¾îÁÖ¸é µÈ´Ù.
»ý¼ºµÈ ÆÄÀÏÀº º¹±¸¿¡µµ »ç¿ëÀÌ °¡´ÉÇÏ´Ù.
±âº»ÀûÀ¸·Î´Â /usr/local/mysql/bin/mysqlbinlog /usr/local/mysql/var/localhost-bin.000001 > bakcup.sql ½ÄÀ¸·Î ÆÄÀÏÀ» ÀÏ¹Ý Äõ¸®·Î ÄÁ¹öÆà °¡´ÉÇÏ´Ù...
»ç¿ëÇÒ ¸¸ÇÑ ¿É¼ÇÀ¸·Î´Â
-d µ¥ÀÌŸº£À̽º¸í ÀÌ°Ç Æ¯Á¤ µ¥ÀÌŸº£À̽º¸¸ °¡Á®¿Â´Ù.
/usr/local/mysql/bin/mysqlbinlog --start-datetime="2008-12-30 01:00:00" --stop-datetime='2009-01-10 01:00:00' /usr/local/mysql/var/localhost-bin.000001 > bakcup.sql
ÀÌ°Ç ½Ã°£À» ÁöÁ¤Çؼ ±×ºÎºÐ¸¸À» °¡Á®¿Â´Ù...
°¡Á®¿Â°É ´Ù½Ã µðºñ·Î ³ÖÀ»¶§´Â . /usr/local/mysql/bin/mysql -u »ç¿ëÀÚ -p < backup.sql ÇØÁÖ¸é µÈ´Ù... |