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

Booraltak   
   Á¶È¸ 3777   Ãßõ 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
2014-05   4860510   Á¤ÀºÁØ1
2015-12   1405722   ¹é¸Þ°¡
2014-04   5244   µ¥À̺ñµå
2007-06   5244   ³²±ÃÀϳ²
2008-04   5244   ¹æÈ¿¹®
2008-02   5244   Á¶ÀçÇö
2012-07   5244   ÀÌÁö
2008-07   5243   ±èµ¿¼ö
2013-12   5243   monan
2006-07   5243   À±»óÇö
2008-06   5243   ¼Õ°æÈ­
2005-06   5243   ¹ÚÂù¹Î
2020-07   5243   Frinc
2016-05   5243   ¾ÆÅ°µ¹ÀÌ
2013-01   5243   ¼ºÅõºÒÆÐ
2005-11   5243   ¿À»óÈÆ
2013-07   5243   ±îºñ
2015-01   5243   Ȳ±¼ÀÌ
2007-11   5243   ¹ÚÇö±Ù
2006-02   5243   ±èÈ«±æ
2006-10   5243   À̵µÈÆ
2013-12   5243   ¹ÎÈ£¾ç