DB ÆÄÀÏ ¹é¾÷¿¡ °üÇÑ Áú¹®ÀÔ´Ï´Ù.

Booraltak   
   Á¶È¸ 3643   Ãßõ 0    

메인 서버가 뻗을 상황을 대비해 백업 서버를 구성을 해두려 합니다. 메인 서버가 부하가 좀 있는 편이고 잘 뻗을 일은 없기에 레플리케이션까지는 고려 안하고 있습니다. 

우선 A서버가 메인이고 B가 백업용입니다. 그리고 A서버와 B서버는 rsync로 15분마다 동기화 되고 매일 밤마다 백업은 따로 실시합니다. (여기선 mysqldump를 씁니다.)

 

작동 중인 A서버에서 mysql DB파일을 그대로 rsync로 B 서버에 덮어쓰면 문제가 생기려나요? 하드웨어는 다르지만 mysql버전과 사용자 id, 비번은 같습니다. 

ªÀº±Û Àϼö·Ï ½ÅÁßÇÏ°Ô.
¹Ú¹®Çü 2015-12
¸ÞÀμ­¹ö°¡ »¸À¸¸é ¹é¾÷¼­¹ö°¡ µ¹¾Æ°¡³ª¿ä??

°­Á¦ÀûÀ¸·Î ¸ÞÀμ­¹ö¸¦ Á×ÀÌ°í ¹é¾÷¼­¹ö¸¦ µ¹·ÈÀ»¶§ Àß µ¹¾Æ°£´Ù¸é ¹®Á¦ ¾øÁö¸¸

¹é¾÷¼­¹ö°¡ Àç´ë·Î ¾Èµ¹¾Æ°£´Ù¸é ¹é¾÷À» ÇÑ Àǹ̴ ȭÀÏÄ«Çǹۿ¡ ¾ÈµÉ °ÍÀÔ´Ï´Ù.
Making Backups by Copying Table Files

For storage engines that represent each table using its own files, tables can be backed up by copying those files.
For example, MyISAM tables are stored as files, so it is easy to do a backup by copying files (*.frm, *.MYD, and *.MYI files).
To get a consistent backup, stop the server or lock and flush the relevant tables:

FLUSH TABLES tbl_list WITH READ LOCK;

You need only a read lock; this enables other clients to continue to query the tables while you are making a copy of the files
in the database directory. The flush is needed to ensure that the all active index pages are written to disk before you start the backup.
See Section 13.3.5, ¡°LOCK TABLES and UNLOCK TABLES Syntax¡±, and Section 13.7.6.3, ¡°FLUSH Syntax¡±.

You can also create a binary backup simply by copying all table files, as long as the server isn't updating anything.
(But note that table file copying methods do not work if your database contains InnoDB tables.
Also, even if the server is not actively updating data, InnoDB may still have modified data cached in memory and not flushed to disk.)

¿ä¾àÇغ¸¸é DBÆÄÀÏÀ» º¹»çÇÏ·Á¸é ¼­¹ö°¡ ¾÷µ¥ÀÌÆ®µÇÁö ¾Ê¾Æ¾ß ÇÏ°í, InnoDB´Â ±×·¯ÇÑ °æ¿ì¿¡µµ flush°¡ ¾ÈµÇ¼­ µ¿ÀÛÀ» ÇÏÁö ¾Ê´Â´Ù... ÁÒ
ȸ¿øK 2015-12
¾ÈµË´Ï´Ù. ±×·¸°Ô ÇÏ·Á¸é rsync¸¦ ÇÏ¸é ¾ÈµÇ°í percona ¿Í °°Àº ÅøÀ» ½á¾ß ÇÕ´Ï´Ù.
¾Æ.... InnoDB¾²´Âµ¥ ·¹Çø®ÄÉÀ̼ǵµ ½É°¢ÇÏ°Ô °í·Á¸¦ ÇØ º¸¾Æ¾ß ÇÒ °Å °°½À´Ï´Ù....


QnA
Á¦¸ñPage 2468/5606
2015-12   1095957   ¹é¸Þ°¡
2014-05   4545943   Á¤ÀºÁØ1
2015-12   11879   ±ô¹Ú±ô¹Ú°¡
2015-12   3371   õ¿Üõoo³ë¡¦
2015-12   3759   ¼ÛÁö¸¸
2015-12   4664   bigmaster
2015-12   5180   SonicGTR
2015-12   4301   niet38h
2015-12   6961   TLaJ3KtYGr
2015-12   3621   ±è°Ç¿ì
2015-12   27228   À̹®¿µ
2015-12   3295   ÇÞ»ìÇѽºÇ¬
2015-12   10328   ¯¯¸Ç
2015-12   3438   °­¼º¹Î
2015-12   3614   ½ÅÀº¿Ö
2015-12   3670   ±è°Ç¿ì
2015-12   3529   ¹Ì¼ö¸Ç
2015-12   3354   ±è°æȯM
2015-12   2937   Å×·¯¸®½ºÆ®
2015-12   6070   ´ëÀü»ç¶÷
2015-12   18215   µÎÆ÷¸®
2015-12   3546   ¸Ó¶óÄ«´Âµ¥