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

Booraltak   
   Á¶È¸ 3623   Ãßõ 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 2807/5590
2014-05   4482362   Á¤ÀºÁØ1
2015-12   1034359   ¹é¸Þ°¡
2015-05   3454   ¶Ñ¶Ñ±è´ë¿ø
2021-03   2584   ½Ãµµ´Ï
2019-12   2222   ¹Ú¹®Çü
2022-10   1436   isaiah
2021-03   4092   NiteFlite9
2021-03   3398   ÄĹÚ
2011-11   5343   ºí·ç¿µ»ó
2014-02   15251   ¹«¾Æ
2016-07   3662   Won³«¿¬
2011-11   4941   ¼­¿ïl½Â¿ë
2014-02   4987   Ȳ¼ºÁø
2011-11   8262   ÀÌ¿øÀçK
2015-06   3071   ´õµå
2022-11   1318   ¼ÒÁÖÇѺ´
2014-02   4556   ÀÌÁöÆ÷Åä
2018-10   3831   ±è°Ç¿ì
2011-12   5158   À¯È£ÁØ
2019-12   21370   jake
2017-07   3123   ±è¿µÇÑ
2014-03   3335   inquisitive