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

Booraltak   
   Á¶È¸ 3776   Ãßõ 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 2527/5657
2015-12   1404866   ¹é¸Þ°¡
2014-05   4859632   Á¤ÀºÁØ1
2015-07   3163   s±èÁ¾È­z
2014-03   3761   ±èÁ¦¿¬
2012-03   7131   »Ç·Î·Ñ·Ñ
2020-01   2191   ghostman
2014-03   28360   ¸¶ÀÌ·¯ºê
2015-08   9138   ±è°Ç¿ì
2016-08   4084   ¾Ç¸¶¶ó³×
2016-08   6876   sensyb
2014-04   6591   handan
2015-08   3155   °í±â¸¸µÎ
09-02   546   ¾ß±¸
2012-03   5570   ¼­¿ïl½Â¿ë
2014-04   4761   IMIN
2014-04   3899   Æ÷¿ì
2018-12   2773   ±è¿µ±â´ëÀü
2021-05   4526   ¾Ë¼ö¾ø´ÂÈû
2020-02   2687   ³ªÀÇÁ¤Ã¼´Â
2012-04   4556   Á¶±³1
2017-09   3861   ºí·ç¿µ»ó
2017-09   4319   À̽ÂÀÍ