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

Booraltak   
   Á¶È¸ 3644   Ãßõ 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 3882/5607
2015-12   1106910   ¹é¸Þ°¡
2014-05   4557641   Á¤ÀºÁØ1
2014-10   3652   Æ®·ç
2016-03   3652   ½½·çÇÁ
2016-03   3652   ½Å¿ì¼·
2021-01   3652   monan
2016-01   3652   izegtob
2017-02   3651   ÇູÇϼ¼
2016-08   3651   waney
2018-03   3651   º½µéÆÇ¿¡¼­´Ù
2014-03   3651   À嵿°Ç2014
2014-03   3651   ȸ¿øK
2018-07   3651   ÄĹÚ
2015-05   3651   Àϸ®ÄÉ
2017-08   3651   ÀÌ´ëÈñ
2016-10   3651   ÆíÇѼ¼»ó
2021-08   3651   ¾î²Ù±â
2018-04   3651   ³ª¶ó»ç¶û
2022-12   3651   LevinF
2015-05   3651   Àü¼³¼ÓÀǹ̡¦
2015-11   3651   ±è°Ç¿ì
2017-04   3651   perls