· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Docbook Sgml/Amanda-KLDP

AMANDA¸¦ ÀÌ¿ëÇÏ¿© ¹é¾÷Çϱâ

AMANDA¸¦ ÀÌ¿ëÇÏ¿© ¹é¾÷Çϱâ

À¯¼ºÅÂ

           
        

AMANDA´Â "Advanced Maryland Automated Network Disk Archiver"ÀÇ ¾àÀڷμ­ Maryland ´ëÇп¡¼­ °³¹ßÇÑ ¹é¾÷ À¯Æ¿¸®Æ¼ÀÌ´Ù. AMANDA´Â ³×Æ®¿÷ ¿©±âÀú±â¿¡ Èð¾îÁ® ÀÖ´Â ÄÄÇ»Å͵éÀÇ µ¥ÀÌŸ¸¦ ¹é¾÷Çϱ⿡ Àû´çÇÑ ¼Ö·ç¼ÇÀÌ´Ù.

고친 과정
고침 0.12002-09-17고친이 styoo
ÃÖÃÊ ÀÛ¼º
고침 0.22002-10-17고친이 styoo
¿ø°Ý ¼­¹ö¿¡¼­ º¹¿øÇÏ´Â ¹æ¹ý Ãß°¡

1. ¼­¹®

À©µµ¿ì ¸Ó½Å¿¡¼­ ³×Æ®¿÷¿¡ Èð¾îÁ® ÀÖ´Â ¿©·¯ ´ëÀÇ ÆÄÀÏ ¼­¹ö¿¡ ÀÖ´Â µ¥ÀÌŸ¸¦ ¹é¾÷/º¹¿øÇϱâ À§Çؼ­´Â ³×Æ®¿÷ µå¶óÀ̺ê·Î ¿¬°áÇؼ­ À©µµ¿ì ¹é¾÷ ¼ÒÇÁÆ®¿þ¾î¸¦ ÀÌ¿ëÇϰųª ¶Ç´Â »ó¿ë ¼ÒÇÁÆ®¿þ¾î¸¦ »ç¿ëÇϴµ¥, »ó¿ë ¼ÒÇÁÆ®¿þ¾îÀÇ °æ¿ì °¢ ÆÄÀÏ ¼­¹ö¸¶´Ù ¸ðµâÀ» »ç¾ßÇϹǷΠ±× °¡°ÝÀÌ ¸¸¸¸Ä¡ ¾Ê´Ù. ±×¸®°í, À©µµ¿ì¿¡¼­ Á¦°øÇÏ´Â ¹é¾÷ ¼ÒÇÁÆ®¿þ¾î¸¦ »ç¿ëÇÒ °æ¿ì, ¹é¾÷ÇÒ ´ë»óÀ» ³×Æ®¿÷ µå¶óÀ̺ê·Î ¿¬°áÇؼ­ ¹é¾÷ÇÒ ¼öµµ Àִµ¥, ÀÌ °æ¿ì´Â ÀϺΠÅ×ÀÙ ÀåÄ¡¸¦ Áö¿øÇÏÁö ¾Ê´Â ¹®Á¦°¡ ÀÖ´Ù. ±×·¡¼­ ¸®´ª½º ¸Ó½Å¿¡¼­ ±× ÀÛ¾÷À» ´ë½ÅÇÒ ¼ö ¾øÀ»±î Çؼ­ ¹é¾÷ ¼ÒÇÁÆ®¿þ¾î¸¦ ã¾Æº¸´Ï AMANDA¶ó´Â °ÍÀÌ ±¦Âú¾Æ º¸¿´´Ù. ¾à ÇÑ ´ÞÀÇ Áغñ ±â°£°ú ½ÃÇè±â°£À» °ÅÃÄ ½ÇÀü¿¡ »ç¿ëÇغ¸´Ï ºñ±³Àû ¸¸Á·½º·´±â¿¡ ¿©·¯ºÐ¿¡°Ôµµ ÃßõÇÏ°íÀÚ ÀÌ ±ÛÀ» ÀÛ¼ºÇÏ°Ô µÇ¾ú´Ù.


1.1. ÀúÀÛ±Ç Á¤º¸

Copyright (C) 2002 À¯¼ºÅÂ

ÀÌ ¹®¼­´Â GNU Free Documentation License ¹öÀü 1.1 ȤÀº ÀÚÀ¯ ¼ÒÇÁÆ®¿þ¾î Àç´Ü¿¡¼­ ¹ßÇàÇÑ ÀÌÈÄ ÆÇÀÇ ±ÔÁ¤¿¡ µû¸£¸ç ÀúÀ۱ǿ¡ ´ëÇÑ º» »çÇ×ÀÌ ¸í½ÃµÇ´Â ÇÑ ¾î¶°ÇÑ Á¤º¸ ¸Åü¿¡ ÀÇÇÑ º»¹®ÀÇ ÀüÀ糪 ¹ßÃéµµ ¹«»óÀ¸·Î Çã¿ëµË´Ï´Ù.


1.2. Ã¥ÀÓÀÇ ÇÑ°è

º» ÀúÀÚ´Â ¹®¼­ÀÇ ³»¿ëÀÌ ¾ß±âÇÒ ¼ö ÀÖ´Â ¾î¶°ÇÑ °á°ú¿¡ ´ëÇؼ­µµ Ã¥ÀÓÀ» ÁöÁö ¾Ê½À´Ï´Ù. º» ¹®¼­¿¡¼­ ³»Æ÷ÇÏ°í ÀÖ´Â Á¤º¸µé ¹× ¿¹Á¦µéÀº ¿©·¯ºÐÀÌ ¾Ë¾Æ¼­ È°¿ëÇϽʽÿÀ. ºñ·Ï ÃÖ¼±À» ´ÙÇßÀ¸³ª ÀÌ ¹®¼­´Â Ʋ¸° Á¡À̳ª ¿À·ù°¡ ÀÖÀ» ¼öµµ ÀÖ½À´Ï´Ù. ¸¸¾à ¿©·¯ºÐÀÌ Æ²¸° Á¡À» ¹ß°ßÇß´Ù¸é ²À Àú¿¡°Ô ¾Ë·Á Áֽñ⠹ٶø´Ï´Ù.


1.3. °¨»çÀÇ ±Û

AMANDA¶ó´Â ºñ±³Àû ÈǸ¢ÇÑ ¹é¾÷ ¼ÒÇÁÆ®¿þ¾î¸¦ °³¹ßÇÏ°í ÀÖ´Â AMANDA °³¹ß ±×·ì¿¡ °¨»çµå¸³´Ï´Ù.


1.4. Çǵå¹é

ÀÌ ¹®¼­¿¡ ´ëÇÑ ¹ßÀüÀûÀÎ Á¦¾ÈÀ̳ª ¼öÁ¤»çÇ×, ¹®Á¦Á¡ µî¿¡ ´ëÇÑ Çǵå¹éÀº ¾ðÁ¦µçÁö ȯ¿µÇÕ´Ï´Ù. ·Î ¸ÞÀÏÀ» º¸³» ÁֽʽÿÀ.


2. Amanda ¼³Ä¡

"UNIX Backup & Recovery" Ã¥¿¡ "Using Amanda"¶ó´Â Amanda »ç¿ë¿¡ ´ëÇÑ ³»¿ëÀÌ ÀÖÀ¸¸ç http://www.backupcentral.com/amanda.html¿¡¼­ ¿Â¶óÀÎÀ¸·Îµµ º¼ ¼ö ÀÖ´Ù. ¼³Ä¡´Â À§ ÀڷḦ Âü°íÇϱ⠹ٶõ´Ù.

Amanda´Â ¹é¾÷À» ¿î¿µÇÒ »ç¿ëÀÚ¸¦ Á¤ÇÏ°Ô µÇ¾î ÀÖÀ¸¸ç, ·¡µåÇÞ ¶Ç´Â µ¥ºñ¾ÈÀº ±× »ç¿ëÀÚ°¡ backupÀ¸·Î ÁöÁ¤µÇ¾î ÀÖ´Ù. backupÀÌ ¾Æ´Ñ ´Ù¸¥ »ç¿ëÀÚ·Î ÁöÁ¤ÇÏ·Á¸é ÆÐÅ°Áö¸¦ ´Ù½Ã ºôµåÇÏ¿©¾ß Çϴµ¥ configure ´Ü°è¿¡¼­ ¿øÇÏ´Â »ç¿ëÀÚ·Î ¹Ù²Û ÈÄ ÆÐÅ°Áö¸¦ ºôµåÇÏ¸é µÈ´Ù. ÇÊÀÚ´Â µ¥ºñ¾È ¼Ò½º ÆÐÅ°Áö¸¦ ¹Þ¾Æ´Ù°¡ --with-user=backup --with-group=backupÀ» --with-user=styoo --with-group=styoo·Î ¹Ù²Ù¾ú´Ù. ´ç¿¬ÇÑ ¸»ÀÌÁö¸¸, styoo´Â ÇÊÀÚ°¡ »ç¿ëÇÏ´Â ¸®´ª½º ¹Ú½ºÀÇ login nameÀÌ´Ù. ±× ÀÌ¿ÜÀÇ configure ¿É¼ÇÀº Ưº°È÷ ¹Ù²Ü ÇÊ¿ä°¡ ¾øÀ» °ÍÀÌ´Ù. µ¥ºñ¾È ¼Ò½º ÆÐÅ°Áö¸¦ ¹Þ¾Æ¼­ »õ·ÎÀÌ ºôµåÇÒ °æ¿ì, rules ÆÄÀÏ¿Ü¿¡ ¸î °³ÀÇ ÆÄÀÏ¿¡¼­ backupÀ» ¿øÇÏ´Â »ç¿ëÀÚ·Î(¿©±â¼­´Â styoo) ¹Ù²Ù¾î ÁÖ¾î¾ßÇÑ´Ù. »õ·ÎÀÌ ºôµåÇϱⰡ ¹ø°Å·Ó´Ù¸é, »ç¿ëÀÚ¸¦ ¹Ù²Ü ÇÊ¿ä ¾øÀÌ Á¦°øµÇ´Â ÆÐÅ°Áö ±×´ë·Î ¼³Ä¡Çؼ­ »ç¿ëÇصµ µÈ´Ù. ±×·¯³ª À̶§´Â root ¶Ç´Â backup »ç¿ëÀÚ·Î ¹é¾÷À» ½ÇÇàÇØ¾ß ÇÒ °ÍÀÌ´Ù.

Amanda´Â ¼­¹ö s/w¿Í Ŭ¶óÀ̾ðÆ® s/w·Î ±¸¼ºµÇ¾î ÀÖ´Ù. ¼­¹ö s/w´Â Å×ÀÙ ÀåÄ¡°¡ ºÎÂøµÇ¾î ÀÖÀ¸¸ç ¹é¾÷ ÇÁ·Î¼¼½º°¡ µ¹¾Æ°¥ ¼­¹ö(ÀÌÇÏ Å×ÀÙ¼­¹ö¶ó ĪÇÔ.)¿¡ ¼³Ä¡µÉ °ÍÀ̸ç, Ŭ¶óÀ̾ðÆ® s/w´Â ¹é¾÷ÇÒ µ¥ÀÌŸ¸¦ ÀúÀåÇÏ°í ÀÖ´Â ½Ã½ºÅÛ(ÀÌÇÏ ÆÄÀϼ­¹ö¶ó ĪÇÔ)¿¡ ¼³Ä¡µÉ °ÍÀÌ´Ù. Å×ÀÙ¼­¹ö¿¡µµ ¹é¾÷ÇÒ µ¥ÀÌŸ°¡ ÀÖ´Ù¸é Ŭ¶óÀ̾ðÆ® s/w¸¦ ¼³Ä¡ÇØ¾ß ÇÑ´Ù.

±× ¿Ü¿¡ ¹Ýµå½Ã ÇÊ¿äÇÑ ¼ÒÇÁÆ®¿þ¾î·Î´Â tar, mt-st°¡ ÀÖÀ¸¸ç, À©µµ¿ì ½Ã½ºÅÛÀÇ µ¥ÀÌŸ¸¦ samba¸¦ ÀÌ¿ëÇÏ¿© ¹é¾÷ÇÏ·Á°í ÇÑ´Ù¸é samba°¡ ÇÊ¿äÇÒ °ÍÀÌ°í Å×ÀÙ ÀåÄ¡¿¡ autoloader³ª scsi changer¿Í °°Àº ¹Ìµð¾î üÀÎÀú°¡ ÀÖ´Ù¸é mtxµµ ÇÊ¿äÇÒ °ÍÀÌ´Ù.

Amanda´Â ¹é¾÷ÇÒ ¶§ dump¿Í tar µÎ °¡Áö ¸í·É Áß¿¡ ÇÑ °¡Áö¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù. ¿©±â¼­´Â tar¸¦ »ç¿ëÇÏ¿© ¹é¾÷ÇÏ´Â °ÍÀ» ±âÁØÀ¸·Î ¼³¸íÇϹǷΠ¹öÀü 1.12 ÀÌÈÄÀÇ tar°¡ ¹Ýµå½Ã ¼³Ä¡µÇ¾î ÀÖ¾î¾ß ÇÑ´Ù.


3. ´ë·«ÀûÀÎ AMANDAÀÇ ÀÛµ¿¿¡ ´ëÇÏ¿©

¿©·¯°¡Áö ¼¼¼¼ÇÑ ¼³Á¤¿¡ ´ëÇؼ­´Â 6절¿¡¼­ ¼³¸íÇÏ°í ÀÖÀ¸´Ï Âü°íÇϱ⠹ٶó¸ç, ¿©±â¼­´Â ´ë°­ÀÇ Amanda ÀÛµ¿ ¼ø¼­¸¦ ¼³¸íÇÏ°Ú´Ù.

¹é¾÷À» ½ÃÀÛÇϱâ Àü¿¡ Å×ÀÙÀ» ÀνÄÇÒ ¼ö ÀÖ´Â ¶óº§À» amlabel ¸í·ÉÀ¸·Î Å×ÀÙ¿¡ ½á ³Ö¾î¾ß ÇÑ´Ù. ¶óº§À» Å×ÀÙ¿¡ ¾²°í ³ª¸é amcheck ¸í·ÉÀ¸·Î ¼³Á¤¿¡ ¹®Á¦°¡ ¾ø´ÂÁö Á¡°ËÀ» ÇÏ°í ¹®Á¦°¡ ¾ø´Ù¸é ¹é¾÷À» ½ÇÇàÇÒ ¼ö ÀÖ´Â °ÍÀÌ´Ù.

¹é¾÷Àº amdump ¸í·ÉÀ¸·Î ½ÇÇà½ÃŲ´Ù. ½ÇÇàÀÌ µÇ¸é disklist ÆÄÀϷκÎÅÍ ¹«¾ùÀ» ¹é¾÷ÇÒ °ÍÀÎÁö È®ÀÎÇÑ ´ÙÀ½, ¹é¾÷ÇØ¾ß ÇÒ µ¥ÀÌŸ ¿ë·®À» ÃßÁ¤ °è»êÇϱ⠽ÃÀÛÇÑ´Ù. disklist ÆÄÀÏÀº »ç¿ëÀÚ°¡ ÀÛ¼ºÇØ¾ß ÇÏ¸ç ¿©±â¿¡´Â ¹é¾÷ÇÒ ´ë»ó(¹é¾÷ ¼­¹öÀÇ µð·ºÅ丮)ÀÇ ¸ñ·ÏÀÌ ÀúÀåµÇ¾î ÀÖ´Ù.

óÀ½ ¹é¾÷ÇÏ´Â µð·ºÅ丮¶ó¸é ½ÇÁ¦ ¿ë·®¿¡ 0.5¸¦ °öÇÑ °ªÀ» ¹é¾÷ÇÒ ¿ë·®À¸·Î »êÁ¤ÇÑ´Ù. ±âÁ¸¿¡ ¹é¾÷Çß´ø µð·ºÅ丮´Â ¾ÐÃà·üÀÌ Áö³­ ¹ø ¹é¾÷¿¡¼­ °áÁ¤µÈ °ÍÀÌ ÀÖÀ¸¹Ç·Î ±× °ªÀ» »ç¿ëÇÏ¿© ¹é¾÷ÇÒ ¿ë·®À» °è»êÇÑ´Ù.

¿ë·®À» ÃßÁ¤ °è»ê Çϸ鼭 ¹é¾÷ÇÒ °¢ ´ë»óÀÇ ¹é¾÷ ·¹º§µµ °áÁ¤ÇÑ´Ù. ±× ´ë»óÀÌ ±âÁ¸¿¡ ¹é¾÷ÇÑ ÀûÀÌ ¾ø´Ù¸é Full ¹é¾÷(ÀÌÇÏ Àüü¹é¾÷À̶ó ĪÇÔ)À» ÇÒ °ÍÀÌ°í ±×·¸Áö ¾Ê´Ù¸é Amanda°¡ ¾Ë¾Æ¼­ Incremental ¹é¾÷(ÀÌÇÏ ÁõºÐ ¹é¾÷À̶ó ĪÇÔ)ÀÇ ·¹º§À» °áÁ¤ÇÑ´Ù. ¹°·Ð »ç¿ëÀÚ°¡ ¹é¾÷ ·¹º§À» ¼³Á¤ÇÒ ¼öµµ ÀÖ´Ù. ¹é¾÷ ·¹º§¿¡ ´ëÇÑ °ÍÀº 8.6절À» Âü°íÇϱ⠹ٶõ´Ù.

¸ðµç ¹é¾÷ ´ë»ó¿¡ ´ëÇÑ ¿ë·® °è»êÀÌ ³¡³­ ÈÄ µ¥ÀÌŸ¸¦ ¹Þ±â ½ÃÀÛÇÏ¸ç ±× µ¥ÀÌŸ¸¦ Å×ÀÙ¼­¹öÀÇ ·ÎÄõð½ºÅ©¿¡ ÀúÀåÇÑ´Ù. ·ÎÄõð½ºÅ©¿¡ ÀúÀåÀÌ ¿Ï·áµÈ ¹é¾÷ ´ë»óºÎÅÍ Å×ÀÙÀ¸·Î ¾²±â ½ÃÀÛÇÑ´Ù. ¼³Á¤Çϱ⿡ µû¶ó¼­´Â Å×ÀÙÀ¸·Î ¹Ù·Î ¾µ ¼öµµ ÀÖ´Ù. Å×ÀÙÀ¸·Î ¹Ù·Î ¾²´Â °Í¿¡ ´ëÇؼ­´Â 8.7절À» Âü°íÇϱ⠹ٶõ´Ù. ¾î·µç Amanda´Â µ¥ÀÌŸ¸¦ ¹Þ¾Æ¼­ ·ÎÄõð½ºÅ©¿¡ ÀúÀåÇß´Ù°¡ Å×ÀÙÀ¸·Î ¾²´Â ¹æ½ÄÀ» ÃëÇÏ°í ÀÖ´Ù´Â °ÍÀÌ´Ù. °¢ ¹é¾÷ ´ë»óÀÇ µ¥ÀÌŸ¸¦ ¹Þ¾Æ¼­ ³ª¸§ÀÇ Çü½ÄÀ¸·Î °¢°¢ ÇϳªÀÇ ÆÄÀÏ·Î ¸¸µå´Âµ¥ À̶§ ÆÄÀϵéÀ» ½ÇÁ¦·Î ¹­¾îÁÖ´Â °ÍÀº tar¸¦ ÀÌ¿ëÇÑ´Ù. ¶Ç´Â tar ´ë½Å¿¡ dump¸¦ »ç¿ëÇÒ ¼öµµ ÀÖÀ¸³ª ¿©±â¼­´Â tar¸¦ »ç¿ëÇÏ´Â °ÍÀ» ±âÁØÀ¸·Î ¼³¸íÇÏ°Ú´Ù.

amdump¸¦ ½ÇÇà½ÃŲ ÈÄ ¹é¾÷ ÁøÇà »óÅ´ amstatus ¸í·ÉÀ¸·Î È®ÀÎÇÒ ¼ö ÀÖ´Ù. ¹é¾÷ÀÌ ¿Ï·áµÇ¸é Amanda ¼³Á¤ ÆÄÀÏ¿¡ ÁöÁ¤µÇ¾î ÀÖ´Â À̸ÞÀÏ ÁÖ¼Ò·Î ¿Ï·áµÈ ¹é¾÷¿¡ ´ëÇÑ Á¤º¸°¡ º¸³»Áö¸ç ±× ¾È¿¡´Â ¿¡·¯ »óȲµµ °°ÀÌ Ç¥½ÃµÈ´Ù.

¹é¾÷ÀÇ ¼ø¼­¸¦ ´Ù½Ã ÇÑ ¹ø Á¤¸®ÇØ º¸¸é,

  1. amlabel ¸í·ÉÀ¸·Î Å×ÀÙ¿¡ ¶óº§À» ºÙÀδÙ.

  2. amcheck ¸í·ÉÀ¸·Î ¼³Á¤ÀÇ ÀÌ»ó À¯¹«¸¦ Á¡°ËÇÑ´Ù.

  3. amdump ¸í·ÉÀ¸·Î ¹é¾÷À» ½ÇÇà½ÃŲ´Ù.

  4. amstatus ¸í·ÉÀ¸·Î ¹é¾÷ ÁøÇà »óȲÀ» Á¡°ËÇÑ´Ù.


4. Å×ÀÙ ÀåÄ¡ÀÇ ¼³Ä¡ ¹× ÀÛµ¿

Å×ÀÙ ÀåÄ¡ÀÇ ¹°¸®ÀûÀÎ ¿¬°áÀº °¢ÀÚ ¾Ë¾Æ¼­ Çϱâ·Î ÇÏ°í ¿©±â¼­´Â ÀϹÝÀûÀÎ SCSI Å×ÀÙ ÀåÄ¡ÀÇ ÀÎ½Ä ¿©ºÎ ¹× ÀÛµ¿ ¿©ºÎ¿¡ ´ëÇØ ¼³¸íÇϵµ·Ï ÇÏ°Ú´Ù.

SCSI Å×ÀÙ ÀåÄ¡°¡ Á¦´ë·Î ÀνĵǾú´ÂÁö È®ÀÎÇÏ·Á¸é, /proc/scsi/scsi ÆÄÀÏÀ» Àо±â ¹Ù¶õ´Ù. ÇÊÀÚ ½Ã½ºÅÛÀÇ /proc/scsi/scsi ÆÄÀÏÀ» Àо¸é,

      $ cat /proc/scsi/scsi
      Attached devices: 
      Host: scsi0 Channel: 00 Id: 03 Lun: 00
        Vendor: HP       Model: C5683A           Rev: C005
        Type:   Sequential-Access                ANSI SCSI revision: 02
    
HPÀÇ ¸ðµ¨¸í C5683A¶ó´Â Å×ÀÙ ÀåÄ¡°¡ ÀνĵǾî ÀÖÀ½À» ¾Ë ¼ö ÀÖ´Ù.

º¸À¯ÇÏ°í ÀÖ´Â Å×ÀÙ ÀåÄ¡ÀÇ ¸ðµ¨ÀÌ Ç¥½ÃµÇ¸é Á¤»óÀûÀ¸·Î ÀÎ½ÄµÈ °ÍÀÌ´Ù. ¸¸ÀÏ, ÀνÄÀÌ ¾ÈµÈ´Ù¸é Ä¿³Î¿¡¼­ SCSI °ü·Ã ºÎºÐÀÌ Á¦´ë·Î ¼³Á¤ÀÌ ¾ÈµÈ °ÍÀÏ °¡´É¼ºÀÌ ¸¹À¸´Ï Ä¿³ÎÀ» »õ·ÎÀÌ ÄÄÆÄÀÏ ÇØ¾ß ÇÒ °ÍÀÌ´Ù. Ä¿³Î ÄÄÆÄÀÏ°ú SCSI ÀåÄ¡¿¡ ´ëÇÑ °ÍÀº The Linux Kernel HOWTO ¹®¼­¿Í The Linux 2.4 SCSI subsystem HOWTO ¹®¼­¸¦ °¢°¢ Âü°íÇϱ⠹ٶõ´Ù.

Å×ÀÙ ÀåÄ¡°¡ Á¦´ë·Î ÀÛµ¿ÇÏ´Â Áö È®ÀÎÇØ º¸±â À§ÇØ tar ¸í·ÉÀ¸·Î Å×ÀÙ¿¡ ÆÄÀÏÀ» ½á ³Ö¾î º¸ÀÚ. Å×ÀÙ ÀåÄ¡¿¡ ¾µ ¼ö ÀÖ´Â ±ÇÇÑÀº root¿¡°Ô ÀÖÀ» °ÍÀ̹ǷΠroot·Î ·Î±×ÀÎÇؼ­ tar ¸í·ÉÀ» ½ÇÇàÇØ¾ß ÇÒ °ÍÀÌ´Ù.

/home/styoo¸¦ ¹é¾÷ÇØ º¸ÀÚ. Å×ÀÙ ÀåÄ¡°¡ Çϳª »ÓÀ̶ó¸é Å×ÀÙ ÀåÄ¡´Â /dev/st0°¡ µÉ °ÍÀÌ´Ù.

      # tar cvf /dev/st0 /home/styoo
    
Á¦´ë·Î ½ÇÇàÀÌ µÇ´Â°¡? Á¦´ë·Î µÈ´Ù¸é ¹é¾÷ÇÑ ¸ñ·ÏÀ» ÇÑ ¹ø È®ÀÎÇØ º¸ÀÚ.
      # tar tvf /dev/st0
    
¹é¾÷ÇÑ °ÍÀ» /tmp µð·ºÅ丮¿¡ º¹¿øÇØ º¸ÀÚ.
      # cd /tmp
      # tar xvf /dev/st0
    
Á¤»óÀûÀ¸·Î ÀÛµ¿Çϴ°¡? ±×·¸´Ù¸é Å×ÀÙ ÀåÄ¡ÀÇ ¼³Ä¡¿Í ÀÛµ¿ÀÌ Á¤»óÀûÀ̹ǷΠAmanda¸¦ ÀÌ¿ëÇÏ¿© ¹é¾÷ÇÒ Áغñ°¡ µÇ¾ú´Ù°í ÇÏ°Ú´Ù. Å×ÀÙ ÀåÄ¡°¡ Á¦´ë·Î Àνĸ¸ µÈ´Ù¸é tar¸¦ ÀÌ¿ëÇÑ ¹é¾÷À̳ª º¹¿ø¿¡´Â º°´Ù¸¥ ¹®Á¦°¡ ¾øÀ» °ÍÀÌ´Ù. ÀÌ ´Ü°è¿¡¼­ ¹®Á¦°¡ ¹ß»ýÇÑ´Ù¸é ÁÖÀ§ »ç¶÷µé¿¡°Ô ¹°¾îº¸°Å³ª HOWTO ¹®¼­¸¦ Âü°íÇÏ¿© ÇØ°áÇϱ⠹ٶõ´Ù.


5. AMANDA°¡ »ç¿ëÇÏ´Â ÆÄÀϵé

Amanda°¡ ÀÛµ¿Çϴµ¥ ÇÊ¿äÇÑ ÆÄÀÏÀÌ ¿©·¯°³ ÀÖ´Ù. ±× ÆÄÀϵ鿡 ´ëÇؼ­ ¾Ë¾Æº¸ÀÚ. Amanda´Â ÇÊ¿ä¿¡ µû¶ó¼­ ¿©·¯ °¡Áö ¼³Á¤À» °¡Áú ¼ö ÀÖ´Ù. ¼³Á¤ ÆÄÀÏÀÇ ÃÖ»óÀ§ µð·ºÅ丮´Â /etc/amandaÀÌ¸ç ±× ¹Ø¿¡ ¼­ºêµð·ºÅ丮¸¦ ¸¸µé¾î¼­ ÀÔ¸À¿¡ ¸Âµµ·Ï ¼³Á¤À» º¯°æÇÒ ¼ö ÀÖ´Ù.

¿¹¸¦ µé¾î, ÇÁ·ÎÁ§Æ® ¸í SpaceWar¿Í EarthBurnÀ̶ó´Â µÎ °³ÀÇ ÇÁ·ÎÁ§Æ®¸¦ ¼öÇàÇÏ°í ÀÖ´Ù°í ÇÏÀÚ. °¢ ÇÁ·ÎÁ§Æ® º°·Î µû·Î ¹é¾÷À» °ü¸®ÇÒ °èȹÀ̶ó¸é /etc/amanda/SpaceWar¿Í /etc/amanda/EarthBurn¶ó´Â µÎ °³ÀÇ µð·ºÅ丮¸¦ ¸¸µé¾î¼­ ±× ¾Æ·¡¿¡ ÇÊ¿äÇÑ ÇÊ¿äÇÑ ¼³Á¤ ÆÄÀÏÀ» ³Ö¾î µÑ ¼ö ÀÖ´Ù. ±×¸®°í °øÅëÀ¸·Î »ç¿ëÇÏ´Â ¼³Á¤Àº /etc/amanda µð·ºÅ丮¿¡ ³Ö¾îµÎ¸é µÈ´Ù.

Å×ÀÙ¼­¹ö¿¡¼­ »ç¿ëÇÏ´Â ÆÄÀϵéÀº ¾Æ·¡¿Í °°´Ù. °¢°¢ÀÇ À§Ä¡´Â Amanda ¼Ò½º·ÎºÎÅÍ ¹ÙÀ̳ʸ®¸¦ ºôµåÇÒ ¶§ ¼³Á¤Çϱ⿡ µû¶ó ¹Ù²ð ¼ö ÀÖ´Ù.

/etc/amanda/amanda.conf

Å×ÀÙ ÀåÄ¡¿¡ ´ëÇÑ ¼³Á¤, µ¿½Ã¿¡ ÁøÇàµÉ ¹é¾÷ ÇÁ·Î¼¼½ºÀÇ ¼öµî°ú °°Àº °øÅëÀûÀ¸·Î »ç¿ëµÇ´Â ¼³Á¤¿¡ ´ëÇÑ Á¤ÀǸ¦ Æ÷ÇÔÇÏ°í ÀÖ´Ù. ¹Ýµå½Ã ÀÌ ÆÄÀÏÀÌ ÇÊ¿äÇÑ °ÍÀº ¾Æ´Ï´Ù. ´Ù¸¸ °øÅëµÇ´Â ¼³Á¤À» ÇÑ °÷¿¡ ¸ð¾ÆµÎ´Â °ÍÀÌ ÆíÇÏ´Ù´Â ÇÊÀÚÀÇ »ý°¢¿¡ µû¸¥ °ÍÀÏ »ÓÀÌ´Ù.

/etc/amandahosts

Å×ÀÙ¼­¹ö¿¡¼­ ÆÄÀϼ­¹ö·Î ¾×¼¼½º°¡ °¡´ÉÇϵµ·Ï Å×ÀÙ ¼­¹öÀÇ È£½ºÆ®³×ÀÓ°ú »ç¿ëÀÚ À̸§À» ÀúÀåÇÏ°í ÀÖ´Ù.

/etc/amandapass

À©µµ¿ì ÆÄÀÏ ¼­¹öÀÇ µ¥ÀÌŸ¸¦ samba¸¦ ÀÌ¿ëÇÏ¿© ¹é¾÷ÇÒ °æ¿ì, °øÀ¯ À̸§°ú Á¢±Ù ±ÇÇÑÀ» °¡Áø »ç¿ëÀÚ À̸§ ±×¸®°í ±× »ç¿ëÀÚÀÇ ¾ÏÈ£¿¡ ´ëÇÑ ¸ñ·ÏÀ» ÀúÀåÇÏ´Â ÆÄÀÏÀÌ´Ù.

/etc/amanda/SpaceWar/amanda.conf

ÀÌ ÀýÀÇ Ã³À½¿¡¼­ ¿¹¸¦ µç, °¡»óÀÇ SpaceWar¶ó´Â ÇÁ·ÎÁ§Æ®¿¡ ´ëÇÑ ¼³Á¤ ÆÄÀÏÀÌ¸ç ±× ¾È¿¡ /etc/amanda/amanda.conf ÆÄÀÏÀ» ºÎ¸£´Â ¼³Á¤ÀÌ µé¾î ÀÖÀ¸¸ç, Å×ÀÙ ¶óº§¿¡ ´ëÇÑ ¼³Á¤, ·Î±× ÆÄÀÏÀÇ À§Ä¡ µîÀ» Æ÷ÇÔÇÑ´Ù.

/etc/amanda/SpaceWar/disklist

ÀÌ ÆÄÀÏ¿¡ SpaceWar¶ó´Â ÇÁ·ÎÁ§Æ®ÀÇ ¹é¾÷ÇÒ µð·ºÅ丮¿Í ±× µð·ºÅ丮°¡ ÀÖ´Â ÆÄÀÏ ¼­¹öÀÇ ¸ñ·Ï ±×¸®°í ¹é¾÷ ÇüŸ¦ ÁöÁ¤ÇÑ´Ù.

/var/lib/amanda/amandates

/etc/amanda/*/disklist ÆÄÀÏ¿¡¼­ Á¤ÀÇµÈ ¹é¾÷ ¸ñ·ÏÁß¿¡¼­ ¹é¾÷ÀÌ ¿Ï·áµÈ °Í¿¡ ´ëÇÏ¿© ±× µð·ºÅ丮 À̸§°ú ¹é¾÷ ·¹º§ ±×¸®°í ¹é¾÷µÈ ³¯Â¥¸¦ ÀúÀåÇÏ°í ÀÖ´Ù.

/var/lib/amanda/gnutar-lists/

ÀÌ µð·ºÅ丮 ¹Ø¿¡ ¹é¾÷µÈ µð·ºÅ丮(¶Ç´Â ÆÄÀϽýºÅÛ)¿¡ ´ëÇÑ »óÅ°¡ ÀúÀåµÈ ÆÄÀϵéÀÌ ÀÖÀ¸¸ç À̸¦ ÂüÁ¶·Î ´ÙÀ½ ÁõºÐ ¹é¾÷ ÇÒ ¶§¿¡ Æ÷ÇÔÇÒ ÆÄÀϵéÀÌ °áÁ¤µÈ´Ù. ÀÌ µð·ºÅ丮¿¡ ÀÖ´Â ÆÄÀϵéÀº tar¿¡ ÀÇÇØ »ý¼ºµÈ´Ù.

/var/lib/amanda/SpaceWar/curinfo/

¹é¾÷µÈ °¢ µð·ºÅ丮¿¡ ´ëÇÑ È÷½ºÅ丮°¡ ÀúÀåµÈ´Ù.

/var/lib/amanda/SpaceWar/index/

ÈçÈ÷ catalogue¶ó°í ÇÏ´Â ¹é¾÷µÈ ÆÄÀÏ ¸ñ·ÏÀÌ ÀúÀåµÈ´Ù.

/var/lib/amanda/SpaceWar/tapelist

»ç¿ëÇÒ Å×ÀÙ ¸ñ·ÏÀ» ÀúÀåÇÏ°í ÀÖ´Ù.

/var/log/amanda/SpaceWar/log/

¹é¾÷ ·Î±×°¡ ÀúÀåµÈ´Ù.


6. AMANDA ¼³Á¤ Çϱâ

6.1. ÇÊÀÚÀÇ ½Ã½ºÅÛ ±¸¼º

µé¾î°¡±â Àü¿¡, ÇÊÀÚ°¡ »ç¿ëÇÏ´Â Å×ÀÙ ÀåÄ¡, ¸®´ª½º ¼­¹ö ±×¸®°í ¼³Á¤¿¡ ÇÊ¿äÇÑ °¡Á¤ µî¿¡ ´ëÇÑ ¾ê±â¸¦ Àá±ñÇÏ°íÀÚ ÇÑ´Ù.

¿ì¼±, Å×ÀÙ ÀåÄ¡´Â ¸ðµ¨¸í ULT3581ÀÎ IBM Ultrium Tape AutoloaderÀÌ´Ù. 1 °³ÀÇ µå¶óÀ̺ê¿Í 7°³ÀÇ ½½·ÔÀ» °¡Áø Á¦Ç°ÀÌ´Ù. ¹Ìµð¾î ÇϳªÀÇ ¿ë·®Àº ºñ¾ÐÃà »óÅ·Π100GBÀ̸ç 50% ¾ÐÃàÀÌ µÈ´Ù°í ÇÑ´Ù¸é ÃÖ´ë 200GB±îÁö ÇϳªÀÇ ¹Ìµð¾î¿¡ ÀúÀåÇÒ ¼ö ÀÖ´Ù. Å×ÀÙ¿¡ µ¥ÀÌŸ¸¦ ±â·ÏÇÏ´Â ¼Óµµµµ Æò±Õ 14MB ÀÌ»óÀÌ ³ª¿À¸ç À©µµ¿ì¿¡¼­´Â 20MB ¼Óµµ°¡ ³ª¿À´Â °ÍÀ» È®ÀÎÇÏ¿´´Ù. ƯÁ¤ Á¦Ç° ¼±ÀüÀ» À§ÇÑ °ÍÀÌ ¾Æ´ÔÀº µÎ ¸»ÇÒ ³ªÀ§µµ ¾ø´Ù. DAT, DLT µî¿¡ ºñÇØ ¿ùµîÈ÷ ºü¸¥ ¼Óµµ¸¦ º¸¿©ÁÖ°í ÀÖÀ¸¸ç Super DLT¿Í´Â ºñ±³¸¦ ÇÏÁö ¾Ê¾Æ¼­ ¾Æ´Â ¹Ù°¡ ¾ø´Ù.

¸®´ª½º´Â Debian 3.0À̸ç Ä¿³ÎÀº ¹öÀü 2.4.18À» »ç¿ëÇÏ°í ÀÖ´Ù. Ä¿³ÎÀº ¼Ò½º·ÎºÎÅÍ µû·Î ÄÄÆÄÀÏ ÇÏ¿´´Ù. À§ Å×ÀÙ ÀåÄ¡¿¡ ´ëÇÑ µð¹ÙÀ̽º µå¶óÀ̹ö¸¦ IBM¿¡¼­ Á¦°øÇÏ°í ÀÖÀ¸¸ç RedHat 7.1/7.2¿¡¼­ »ç¿ëÇÒ ¼ö ÀÖ°í RedHat¿¡¼­ Á¦°øÇÏ´Â 2.4.2 Ä¿³Î ¶Ç´Â kernel.org¿¡¼­ Á¦°øÇÏ´Â 2.4.9 Ä¿³ÎÀ» Áö¿øÇÑ´Ù°í ÇÑ´Ù. ±×·¯³ª ¹Ýµå½Ã IBM¿¡¼­ Á¦°øÇÏ´Â µð¹ÙÀ̽º µå¶óÀ̹ö¸¦ »ç¿ëÇÒ ÇÊ¿ä´Â ¾ø´Ù. ÇÊÀÚ´Â 2.4.18ÀÇ sg ¸ðµâ°ú st ¸ðµâÀ» ÀÌ¿ëÇÏ°í ÀÖÀ¸¸ç ¾ÆÁ÷ ¾Æ¹«·± ¹®Á¦Á¡À» ¹ß°ßÇÏÁö ¸øÇÏ¿´´Ù. IBMÀÇ µå¶óÀ̹ö¸¦ »ç¿ëÇÏ¿´À» ¶§ ¼Óµµ°¡ ´õ Çâ»óµÇ´Â Áö´Â ¸ð¸£°ÚÀ¸³ª, ÀÌ ±ÛÀ» ¾²´Â ½ÃÁ¡¿¡ ¿¾ ±â¾ïÀ» ´õµë¾î º¸¸é º° Â÷ÀÌ°¡ ¾ø¾ú´ø °ÍÀ¸·Î ±â¾ïµÈ´Ù.

5절¿¡¼­ ¾ð±ÞÇÑ ÀûÀÌ ÀÖÁö¸¸, ÇÁ·ÎÁ§Æ®¸í SpaceWar¿¡¼­ »ç¿ëÇÏ´Â ÆÄÀϵéÀ» ¹é¾÷ÇÑ´Ù´Â °¡Á¤ÇÏ¿¡ ¼³Á¤ ºÎºÐÀ» ÁøÇàÇÒ °ÍÀÌ´Ù. ±×¸®°í ¾Æ·¡¿¡¼­ ¼³¸íÇÒ ¼³Á¤Àº µÇµµ·ÏÀ̸é ÀϹÝÀûÀ¸·Î Àû¿ëÇÒ ¼ö ÀÖµµ·Ï ÇÏ°ÚÁö¸¸ ƯÁ¤ ºÎºÐÀº À§¿¡¼­ ¾ð±ÞÇÑ ÇÊÀÚÀÇ ½Ã½ºÅÛ ±¸¼º¿¡ ¸ÂÃ߾ ¼³¸íÇϵµ·Ï ÇÏ°Ú´Ù.


6.2. /etc/amanda/amanda.conf ÆÄÀÏ ¼³Á¤

¾Æ¸¶µµ Amanda Server s/w¸¦ ¼³Ä¡Çϸé /etc/amanda/DailySet1/amanda.confÆÄÀÏÀÌ ÀÖÀ» °ÍÀÌ´Ù. ÀÌ ÆÄÀÏÀ» /etc/amanda/amanda.conf·Î º¹»çÇÑ ÈÄ ÆíÁýÀ» Çϵµ·Ï ÇÏÀÚ. /etc/amanda/amanda.conf¿¡ ¼³Á¤ÇÒ ¿©·¯°¡Áö ÆĶó¹ÌÅÍ°¡ ÀÖ´Ù. ÇÊ¿äÇÑ °ÍµéÀ» Çϳª¾¿ ¾Ë¾Æº¸ÀÚ.

mailto

¹é¾÷ÀÌ ÀÌ·ç¾îÁø °á°ú¿¡ ´ëÇÑ Á¤º¸¸¦ ¸ÞÀÏ·Î ¹ÞÀ» »ç¿ëÀÚ¸¦ ÁöÁ¤ÇÑ´Ù.

mailto "aaa@bbb.ccc.co.kr"

dumpuser

¹é¾÷À» ½ÇÇàÇÒ Å×ÀÙ¼­¹öÀÇ »ç¿ëÀÚ¸¦ ÁöÁ¤ÇÑ´Ù.

dumpuser "styoo"

2절¿¡¼­ ¾ð±ÞÇÑ ´ë·Î ÆÐÅ°Áö¸¦ Amanda »ç¿ëÀÚ¸¦ º¯°æÇÏ¿© »õ·ÎÀÌ ºôµåÇÏÁö ¾Ê°í, Á¦°øµÇ´Â ±×´ë·Î ¼³Ä¡ÇÏ¿´´Ù¸é dumpuser´Â backupÀÌ µÉ °ÍÀÌ´Ù. ¶Ç´Â root°¡ µÉ ¼öµµ ÀÖ´Ù.

etimeout

ÆÄÀϼ­¹öÀÇ ¹é¾÷ÇÒ °¢ µð·ºÅ丮ÀÇ ¿ë·®À» ÃøÁ¤Çϴµ¥ ÇÒ´ç°¡´ÉÇÑ ÃÖ´ë ½Ã°£(´ÜÀ§:ÃÊ).

etimeout 3600

ÆÄÀϼ­¹öÀÇ ¹é¾÷ÇÒ µð·ºÅ丮ÀÇ ¿ë·®À» ÃøÁ¤Çϴµ¥ °É¸®´Â ½Ã°£ÀÌ 3600Ãʸ¦ ÃÊ°úÇÑ´Ù¸é, ´õ ÀÌ»ó ÃøÁ¤ÇÏÁö ¾Ê°í ±× µð·ºÅ丮¿¡ ´ëÇÑ ¹é¾÷À» ÁøÇàÇÏÁö ¾Ê´Â´Ù.

dtimeout

³×Æ®¿÷ ºÒ·® µîÀÇ ÀÌÀ¯·Î ÆÄÀϼ­¹ö·ÎºÎÅÍ ¹é¾÷ÇÒ µ¥ÀÌŸ¸¦ ¹ÞÁö ¸øÇÒ °æ¿ì ´ë±âÇÒ ÃÖ´ë ½Ã°£(´ÜÀ§:ÃÊ).

dtimeout 3600

¹é¾÷ÀÌ ÁøÇàµÇ±â Àü ¶Ç´Â ¹é¾÷ ÁøÇà Áß¿¡ ¾î¶² ÀÌÀ¯·Î ÆÄÀϼ­¹ö·ÎºÎÅÍ µ¥ÀÌŸ¸¦ ¹ÞÁö ¸øÇÒ °æ¿ì, 3600ÃÊ µ¿¾È ´ë±âÇÏ´Ù°¡ ±× ÀÌ»ó ½Ã°£ÀÌ ÃÊ°úµÇ¸é ¹é¾÷À» ÁøÇàÇÏÁö ¾Ê´Â´Ù.

tapedev

Å×ÀÙ ÀåÄ¡¸¦ ÁöÁ¤ÇÑ´Ù.

tapedev "/dev/nst0"

Å×ÀÙ ÀåÄ¡°¡ /dev/st0°¡ ¾Æ´Ï¶ó ¿Ö /dev/nst0ÀÎÁö ±Ã±ÝÇÒ ¼öµµ ÀÖ´Ù. ±×°ÍÀº Amanda°¡ non-rewinding Å×ÀÙ ÀåÄ¡¸¦ »ç¿ëÇϱ⠶§¹®ÀÌ´Ù. non-rewinding Å×ÀÙ ÀåÄ¡´Â "n"À» ºÙ¿©¼­ Ç¥½ÃÇÑ´Ù. µû¶ó¼­ /dev/st0ÀÌ ¾Æ´Ï¶ó /dev/nst0ÀÎ °ÍÀÌ´Ù. /dev/st0¿Í /dev/nst0ÀÇ Â÷ÀÌ´Â tar ¸í·ÉÀ¸·Î ½±°Ô È®ÀÎÇÒ ¼ö ÀÖ´Ù.

/usr/binµð·ºÅ丮¸¦ Å×ÀÙ¿¡ ¹é¾÷ÇÑ ´ÙÀ½, /tmp¿¡ º¹¿øÇÏ´Â °æ¿ì¸¦ °¡Á¤ÇÏÀÚ. ¸ÕÀú, /dev/st0¿¡ ¾²´Â °æ¿ì¸¦ º¸ÀÚ.

                  $ tar cvf /dev/st0 --directory /usr/bin .
		
¹é¾÷ÀÌ ³¡³ª¸é /tmp µð·ºÅ丮·Î À̵¿Çؼ­ º¹¿øÀ» ÇØ º¸ÀÚ.
                  $ cd /tmp
                  $ tar xvf /dev/st0
		
Å×ÀÙÀÌ ÀÚµ¿À¸·Î rewind µÈ ÈÄ¿¡ ¹é¾÷µÈ ÆÄÀϵéÀÌ º¹¿øµÉ °ÍÀÌ´Ù. ÀÌÁ¦, /dev/nst0¿¡ ¹é¾÷ÇÏ´Â °æ¿ì¸¦ º¸ÀÚ.
                  $ tar cvf /dev/nst0 --directory /usr/bin .
                
¹é¾÷ÀÌ ³¡³µÀ¸¸é º¹¿øÀ» ÇØ º¸ÀÚ.
                  $ cd /tmp
                  $ tar xvf /dev/nst0
                
ÆÄÀÏÀÌ Á¦´ë·Î º¹¿ø µÇ´Â°¡? ¾Æ¸¶µµ º¹¿øµÇ´Â ÆÄÀÏÀÌ ÀüÇô ¾ø°Å³ª ¿¡·¯°¡ ¹ß»ýÇÒ °ÍÀÌ´Ù. Å×ÀÙ¿¡ µ¥ÀÌŸ¸¦ ½á ³ÖÀº ÈÄ Å×ÀÙÀÌ rewind µÇÁö ¾Ê¾Ò±â ¶§¹®ÀÌ´Ù. Å×ÀÙÀ» rewind ½ÃŲ ÈÄ ´Ù½Ã º¹¿øÀ» ½ÃµµÇØ º¸ÀÚ.
                  $ mt -f /dev/nst0 rewind
                  $ tar xvf /dev/nst0
		
ÆÄÀÏÀÌ º¹¿øµÇ´Â°¡? ¾Æ¸¶µµ Àß µÉ °ÍÀÌ´Ù. ºñ½ÁÇÏ°Ô /dev/st0¿¡ µ¥ÀÌŸ¸¦ ¹é¾÷ÇÑ ÈÄ À̾ ¶Ç ´Ù¸¥ µ¥ÀÌŸ¸¦ ¹é¾÷Çϸé Å×ÀÙÀÌ Ã³À½À¸·Î rewindµÈ ÈÄ µ¥ÀÌŸ¸¦ µ¤¾î¾²°Ô µÈ´Ù. ±×·¯³ª /dev/nst0¸¦ »ç¿ëÇÏ¸é µÚ¿¡ À̾ µ¥ÀÌŸ¸¦ ½á ³Ö´Â´Ù. Amanda´Â °¢ ¹é¾÷ ´ë»óÀ» °¢°¢ ÇϳªÀÇ ÆÄÀÏ·Î ¸¸µç ÈÄ Å×ÀÙ¿¡ ½á³Ö´Â ¹æ½ÄÀ» ÃëÇÏ°í ÀÖÀ¸¹Ç·Î ¸¸µé¾îÁø °¢ ¹é¾÷ ´ë»óÀÇ °¢ ÆÄÀÏÀ» Â÷·Ê Â÷·Ê Å×ÀÙ¿¡ ½á³Ö¾î¾ß ÇÑ´Ù. µû¶ó¼­ non-rewinding Å×ÀÙ ÀåÄ¡ÀÎ /dev/nst0¸¦ »ç¿ëÇÏ´Â °ÍÀÌ´Ù.

changerdev

autoloader¿Í °°Àº ¹Ìµð¾î üÀÎÀú°¡ ÀÖÀ¸¸é ÁöÁ¤ÇÑ´Ù. ¾Æ·¡ÀÇ tpchanger¿¡ µû¶ó¼­ ¼³Á¤ÇÒ ÇÊ¿ä°¡ ¾ø´Â °æ¿ìµµ ÀÖ´Ù. ÇÊÀÚ°¡ »ç¿ëÇÏ´Â IBM 3581 autoloader´Â À̸¦ ÁöÁ¤ÇÒ ÇÊ¿ä°¡ ¾ø¾ú´Ù.

changerdev "/dev/sg0"

tpchanger

autoloader¿Í °°Àº ¹Ìµð¾î üÀÎÀú°¡ ÀÖÀ¸¸é À̸¦ ±¸µ¿ÇÒ ½ºÅ©¸³Æ®¸¦ ÁöÁ¤ÇÑ´Ù. IBM 3581 autoloaderÀÇ °æ¿ì mtx ÆÐÅ°Áö¿¡ µé¾î ÀÖ´Â mtx-changer ½ºÅ©¸³Æ®¸¦ ¾à°£ ¼öÁ¤ÇÏ´Ï ±×·°Àú·° ±¸µ¿ÇÏ¿´´Ù.

tpchanger "mtx-changer"

tapetype

»ç¿ëÇÒ Å×ÀÙÀÇ Á¾·ù¸¦ ÁöÁ¤ÇÑ´Ù.

tapetype IBM-LTO

À§¿¡¼­ ¿¹·Î µç IBM-LTO´Â Amanda¿¡¼­ ÁöÁ¤µÈ À̸§ÀÌ ¾Æ´Ï¶ó »ç¿ëÀÚ°¡ ÀÓÀÇ·Î ÁöÁ¤ÇÏ´Â °ÍÀÌ´Ù. IBM-LTO°¡ ¾î¶² Å×ÀÙÀΰ¡¿¡ ´ëÇÑ Á¤ÀǸ¦ µû·Î ÇØ ÁÖ¾î¾ß ÇÑ´Ù.

columnspec

¹é¾÷ ÇÁ·Î¼¼½º°¡ ³¡³­ ÈÄ, Amanda´Â ¸ÞÀÏ·Î ±× Á¤º¸¸¦ º¸³»ÁØ´Ù. ±×¶§ »ç¿ëÇÒ °¢ ¸ñ·ÏÀÇ ±æÀÌ µîÀ» ÁöÁ¤ÇÑ´Ù.

columnspec "HostName=0:13,Disk=1:20,OrigKB=1:9,OutKB=1:9,DumpRate=1:7,TapeRate=1:7"

HostName=0:13ÀÇ Àǹ̴Â, È£½ºÆ®³×ÀÓÀÇ Ç¥½Ã¿¡ ÃÖ´ë 13ÀÚ¸¦ »ç¿ëÇÒ ¼ö ÀÖ°í "0"Àº ±× ¿ÞÂÊ¿¡ °ø¹éÀÌ ¾ø´Ù´Â ¶æÀÌ´Ù. ºñ½ÁÇÏ°Ô 1:7Àº ÇØ´ç ¾ÆÀÌÅÛ¿¡ »ç¿ëÇÒ ¼ö ÀÖ´Â ±ÛÀÚÀÇ ¼ö´Â 7°³ ÀÌ¸ç ±× ¿ÞÂÊ¿¡ °ø¹éÀ» Çϳª ³Ö¾î¶ó´Â ÀǹÌÀÌ´Ù. ±×¸®°í °¢ ¾ÆÀÌÅÛÀÇ ¼ø¼­´ë·Î ¸ÞÀÏ¿¡ Ç¥½ÃµÈ´Ù.

holdingdisk

3절¿¡¼­ ¼³¸íÇß´Ù½ÃÇÇ Amanda´Â µ¥ÀÌŸ¸¦ ·ÎÄõð½ºÅ©¿¡ ÀúÀåÇß´Ù°¡ ´Ù½Ã Å×ÀÙÀ¸·Î ¿Å°Ü ¾²´Â ¹æ½ÄÀ» ÃëÇÏ°í ÀÖ´Ù. ÀÌ ·ÎÄõð½ºÅ©¸¦ holdingdisk¶ó°í ºÎ¸¥´Ù.

                  holdingdisk hd1 {
                  comment "main holding disk"
                  directory "/backup-image/Image"
                  use -10Mb
                  chunksize 0
                  }
                

À§¿¡¼­ "use -10Mb"ÀÇ Àǹ̴ 10Mb¸¦ Á¦¿ÜÇÑ ³ª¸ÓÁö °ø°£ ¸ðµÎ¸¦ Amanda°¡ »ç¿ëÇÑ´Ù´Â ¶æÀÌ´Ù. ¾ç¼ö °ªÀ» ÁöÁ¤ÇÏ¸é ±× Å©±â ¸¸Å­¸¸ »ç¿ëÇ϶ó´Â ÀǹÌÀÌ´Ù. ±×¸®°í Amanda´Â µ¥ÀÌŸ¸¦ ¹Þ¾Æ¼­ ¹é¾÷À̹ÌÁö¸¦ ¸¸µé¶§ ÇϳªÀÇ ÆÄÀÏ·Î ¸¸µç´Ù. À̶§ OS Â÷¿ø¿¡¼­ ÆÄÀÏ Å©±â¿¡ Á¦ÇÑÀÌ ÀÖ°í ¹é¾÷À̹ÌÁö°¡ ±× Á¦ÇÑ Å©±âº¸´Ù Å©´Ù¸é ¹®Á¦°¡ ¹ß»ýÇÒ °ÍÀÌ´Ù. À̸¦ ¹æÁöÇϱâ À§Çؼ­ chunksize °ªÀ» ÁöÁ¤ÇÒ ¼ö ÀÖ´Ù. "chunksize 0"´Â À̹ÌÁö Å©±â¸¦ OS¿¡ ¸Ã±ä´Ù´Â ÀǹÌÀÌ´Ù. "chunksize 2Gb"¶ó°í ÁöÁ¤ÇÏ¸é ¹é¾÷À̹ÌÁö¸¦ 2Gb Å©±â·Î ÂÉ°³¶ó´Â ¶æÀÌ µÈ´Ù.

define tapetype

À§¿¡¼­ ÁöÁ¤ÇÑ tapetypeÀ» Á¤ÀÇÇÑ´Ù.

                  define tapetype IBM-LTO {
                  comment "just produced by tapetype program"
                  length 101376 mbytes
                  filemark 0 kbytes
                  speed 13500 kps
                  }
                

»ç¿ëÇÏ´Â Å×ÀÙÀÇ Á¾·ù´Â Å×ÀÙ ÀåÄ¡¿¡ µû¶ó¼­ °áÁ¤µÇ¹Ç·Î Å×ÀÙ ÀåÄ¡°¡ ¹«¾ùÀ̳Ŀ¡ µû¶ó À§ÀÇ Á¤ÀÇ´Â ´Þ¶óÁú °ÍÀÌ´Ù. Amanda ȨÆäÀÌÁö¿¡¼­ ´ëºÎºÐÀÇ Å×ÀÙ ÀåÄ¡¿¡ ´ëÇÑ tapetypeÀ» ±¸ÇÒ ¼ö ÀÖ´Ù. tapetypeÀ» ¾Ë ¼ö°¡ ¾ø´Ù¸é tapetype ¸í·ÉÀ¸·Î ±¸ÇÒ ¼öµµ ÀÖÀ¸¹Ç·Î °ÆÁ¤ÇÒ ÇÊ¿ä´Â ¾ø´Ù. tapetype ¸í·ÉÀÇ »ç¿ë¹ýÀº tapetype --help¸¦ Âü°íÇϱ⠹ٶõ´Ù. ¶Ç´Â Amanda »ç¿ëÀÚ ¸ÞÀϸµ ¸®½ºÆ®¸¦ µÚÁ®º¸¸é ±¸ÇÒ ¼ö ÀÖÀ» °ÍÀÌ´Ù.

define dumptype global

                  define dumptype global {
                  program "GNUTAR"
                  compress server fast
                  index yes
                  record yes
                  }
		

  • program "GNUTAR"´Â ¹é¾÷ ÇÁ·Î±×·¥À¸·Î tar¸¦ »ç¿ëÇÑ´Ù´Â ÀǹÌÀÌ´Ù.

  • compress server fast´Â Å×ÀÙ¼­¹ö¿¡¼­ ¹é¾÷ µ¥ÀÌŸ¸¦ ¾ÐÃàÇϴµ¥ ºü¸¥ ¾ÐÃà ¼Óµµ¸¦ »ç¿ëÇÑ´Ù´Â ÀǹÌÀÌ´Ù. Amanda´Â gzipÀ» ÀÌ¿ëÇÏ¿© ¾ÐÃàÀ» Çϸç fast´Â gzipÀÇ ¾ÐÃà·ü ¿É¼ÇÀÌ´Ù. Áï °¡Àå ³·Àº ¾ÐÃà·üÀ» ÀǹÌÇÑ´Ù. fast ´ë½Å¿¡ best¸¦ »ç¿ëÇÒ ¼öµµ ÀÖ´Ù. ±×¸®°í server ´ë½Å¿¡ client¸¦ »ç¿ëÇÒ ¼öµµ ÀÖ´Ù. ±× Àǹ̴ ±¸±¸ÀýÀýÀÌ ¼³¸íÇÏÁö ¾Ê¾Æµµ ¾Ë ¼ö ÀÖÀ» °ÍÀÌ´Ù.

  • index yes´Â ¹é¾÷µÇ´Â ÆÄÀÏ ¸ñ·Ï(Ä«Å»·Î±×)¸¦ ÀúÀåÇ϶ó´Â ÀǹÌÀÌ´Ù.

  • record yes´Â /var/lib/amanda/amandates ¸¦ ¹é¾÷ÇÒ ¶§ ¾÷µ¥ÀÌÆ®Ç϶ó´Â ÀǹÌÀÌ´Ù.


6.3. /etc/amanda/SpaceWar/amanda.conf ÆÄÀÏ ¼³Á¤

SpaceWar¶ó´Â ÇÁ·ÎÁ§Æ®¿Í °ü·ÃµÈ µ¥ÀÌŸµéÀ» µû·Î ¹é¾÷ÇÑ´Ù´Â °¡Á¤ÇÏ¿¡ ±×¿Í °ü·ÃµÈ ¼³Á¤À» µû·Î ÁöÁ¤ÇÒ ¼ö ÀÖ´Ù. ¸ÕÀú. /etc/amanda ¹Ø¿¡ SpaceWar¶ó´Â µð·ºÅ丮¸¦ Çϳª ¸¸µé°í ±× ¾È¿¡ amanda.conf ÆÄÀÏÀ» ¸¸µé¾î ÆíÁýÀ» ÇÏÀÚ.

includefile

Æ÷ÇÔÇÒ ÆÄÀÏÀ» ÁöÁ¤ÇÑ´Ù.

includefile "/etc/amanda/amanda.conf"

/etc/amanda/amanda.conf ÆÄÀÏ¿¡ °øÅëÀ¸·Î »ç¿ëÇÒ ÆĶó¸ÞŸ¿¡ ´ëÇÑ Á¤ÀÇ°¡ µé¾î ÀÖÀ¸¹Ç·Î ´ç¿¬È÷ Æ÷ÇԵǾî¾ß ÇÑ´Ù.

org

ÀÌ ¹é¾÷ ¼³Á¤¿¡ ´ëÇÑ Àû´çÇÑ Á¦¸ñÀ» ÁöÁ¤ÇÑ´Ù.

org "SpaceWar"

SpaceWar¶ó´Â ÇÁ·ÎÁ§Æ®¿¡ ´ëÇÑ ¹é¾÷ ¼³Á¤À̹ǷΠSpaceWar¶ó°í ÁöÁ¤ÇÏ¿´´Ù.

inparallel

Å×ÀÙ¼­¹ö¿¡¼­ µ¿½Ã¿¡ ÁøÇà ÇÒ ¼ö ÀÖ´Â ¹é¾÷ ÇÁ·Î¼¼½ºÀÇ ¼ö

inparallel 4

maxdumps

ÇϳªÀÇ ÆÄÀϼ­¹ö·Î ºÎÅÍ µ¿½Ã¿¡ ¹é¾÷À» ÁøÇàÇÒ ¼ö ÀÖ´Â ÃÖ´ë °³¼ö

maxdumps 2

A¶ó´Â ÆÄÀϼ­¹ö¿¡ SpaceWarÀÇ µ¥ÀÌŸ°¡ ÀúÀåµÇ´Â µð·ºÅ丮°¡ 4°³ ÀÖ´Ù¸é ±× Áß¿¡¼­ µ¿½Ã¿¡ 2°³ µð·ºÅ丮¿¡ ´ëÇÑ ¹é¾÷À» ÁøÇàÇÒ ¼ö ÀÖ´Ù. ÀüüÀûÀ¸·Î µ¿½Ã¿¡ ÁøÇàµÇ´Â ¹é¾÷ ÇÁ·Î¼¼½ºÀÇ ¼ö´Â inparallel ÆĶó¸ÞŸ¿¡ ÀÇÇØ Á¶ÀýµÈ´Ù. maxdumps ÆĶó¸ÞŸ´Â dumptype¿¡¼­ ÁöÁ¤ÇÒ ¼öµµ ÀÖ´Ù.

runtapes

SpaceWar ÇÁ·ÎÁ§Æ®ÀÇ ¹é¾÷¿¡ »ç¿ëµÉ Å×ÀÙÀÇ °³¼ö

runtapes 2

LTO ¹Ìµð¾î´Â Çϵå¿þ¾î ¾ÐÃàÀ» ÇÏÁö ¾Ê´Â »óÅ·Π100GbÀÇ ¿ë·®À» ÀúÀåÇÒ ¼ö ÀÖÀ¸¹Ç·Î runtapes 2´Â 200GbÀÇ µ¥ÀÌŸ¸¦ ¹é¾÷ÇÒ ¼ö ÀÖ´Ù´Â ÀǹÌÀÌ´Ù. 3절¿¡¼­ ¾ð±ÞÇßµíÀÌ °¢ µð·ºÅ丮¿¡ ´ëÇÑ ¹é¾÷ ¿ë·®À» ´ë·« °è»êÇÑ ´ÙÀ½ ±× ¿ë·®ÀÌ runtapes ÆĶó¸ÞŸ °ªÀ¸·ÎºÎÅÍ °è»êµÇ´Â ¿ë·®À» ÃÊ°úÇϸé ÀϺΰ¡ ¹é¾÷µÇÁö ¾ÊÀ¸¹Ç·Î runtapesÀÇ °ªÀ» Àû´çÈ÷ ÁöÁ¤ÇØ¾ß ÇÒ °ÍÀÌ´Ù.

dumpcycle

ÇÑ ¹øÀÇ Àüü¹é¾÷À¸·ÎºÎÅÍ ´ÙÀ½ ¹ø Àüü¹é¾÷±îÁöÀÇ ÁÖ±â

dumpcycle 4 weeks

ÀÌ °ªÀº ÀûÀýÈ÷ ¾Ë¾Æ¼­ Àâ¾ÆÁÖ¸é µÉ °ÍÀÌ´Ù. 1°³¿ù¿¡ ÇÑ ¹ø Á¤µµ Àüü¹é¾÷À» ÇÑ´Ù°í »ý°¢Çϸé 4ÁÖ Á¤µµ¸é µÉ °ÍÀÌ´Ù. dumpcycleÀº Amanda°¡ ÀÚµ¿À¸·Î ¹é¾÷ ·¹º§À» °áÁ¤Çϱâ À§ÇØ ÇÊ¿äÇÑ ÇϳªÀÇ ÆĶó¸ÞŸÀ̸ç, ÇÊÀÚ´Â ¹é¾÷ ·¹º§°ú ½ºÄÉÁÙÀ» ¼öµ¿À¸·Î °áÁ¤Çϱ⠶§¹®¿¡ dumpcycle ÆĶó¸ÞŸ°¡ ±×¸® Å« Àǹ̴ ¾ø¾ú´Ù. dumpcycle °ªÀ» 0À¸·Î ÁöÁ¤Çϸé Ç×»ó Àüü¹é¾÷À» ÇÑ´Ù´Â ÀǹÌÀ̸ç dumpcycle ÆĶó¸ÞŸ´Â dumptype¿¡¼­ ÁöÁ¤ÇÒ ¼öµµ ÀÖ´Ù.

runspercycle

dumpcycle µ¿¾È¿¡ ½ÇÇàµÉ amdumpÀÇ È¸¼ö

runspercycle 4

dumpcycleÀÌ 4ÁÖÀÌ°í ÀÏÁÖÀÏ¿¡ ÇÑ ¹ø ¹é¾÷À» ½ÇÇàÇÑ´Ù¸é dumpcycle µ¿¾È¿¡ ½ÇÇàµÉ amdumpÀÇ È¸¼ö´Â 4ȸÀÌ´Ù. ¼öµ¿À¸·Î ¹é¾÷ ½ºÄÉÁÙÀ» Á¶ÀýÇÒ °èȹÀ̶ó¸é ÀÌ ÆĶó¸ÞŸµµ Å« Àǹ̴ ¾ø´Ù.

tapecycle

dumpcycle µ¿¾È¿¡ »ç¿ëµÉ Å×ÀÙÀÇ °³¼ö

tapecycle 4 tapes

dumpcycle µ¿¾È¿¡ 2°³ÀÇ Å×ÀÙÀ» °¡Áö°í µ¥ÀÌŸ¸¦ °è¼Ó µ¤¾î ¾²¸é¼­ »ç¿ëÇÒ °èȹÀ̶ó°í ÇÏÀÚ. À̶§ Å×ÀÙÀÌ ¿¡·¯°¡ ³¯ °æ¿ì¸¦ »ý°¢Çؼ­ tapecycleÀº 4 Á¤µµ·Î ÇØ µÎ¸é µÉ °ÍÀÌ´Ù.

labelstr

Å×ÀÙ ¶óº§À» ±¸¼ºÇÒ ¹®ÀÚ¿­

labelstr "^SpaceWar-[0-9][0-9][0-9]*$"

amlabel ¸í·ÉÀ¸·Î Å×ÀÙ¿¡ ¶óº§À» ½á ³ÖÀ»¶§ À§ ¹®ÀÚ¿­ÀÇ ±¸¼º¿¡ ¸Â¾Æ¾ß ÇÑ´Ù.

define dumptype

/etc/amanda/amanda.conf ÆÄÀÏ¿¡¼­ Á¤ÀÇÇß´ø dumptype global ¿Ü¿¡ ´Ù¸¥ dumptypeÀ» Á¤ÀÇÇÑ´Ù.

                  define dumptype always-full {
                         global
                         comment "Full dump of this filesystem always"
                         priority high
                         dumpcycle 0
                         maxdumps 4
                         }
		
dumpcycleÀ» 0À¸·Î ¼³Á¤ÇÏ¿© Ç×»ó Àüü¹é¾÷À» Çϵµ·Ï ¼³Á¤ÇÏ°í dumptype globalÀ» Æ÷ÇÔÇϵµ·Ï ÇÏ¿´À¸¸ç maxdumps¸¦ 4·Î ÁöÁ¤ÇÏ¿´´Ù.
                  define dumptype incr-only {
                         global
                         comment "incremental dump only"
                         priority high
                         strategy nofull
                         maxdumps 4
                  }
		
strategy¸¦ nofull·Î ÁöÁ¤ÇÏ¿© Ç×»ó ¹é¾÷ ·¹º§ 1ÀÇ ÁõºÐ ¹é¾÷À» Çϵµ·Ï ¼³Á¤ÇÏ¿´´Ù. ±âŸ dumptype¿¡¼­ ÁöÁ¤ÇÒ ¼ö ÀÖ´Â ÆĶó¸ÞŸ¿¡ ´ëÇؼ­´Â Amanda man page¸¦ Âü°íÇϱ⠹ٶõ´Ù.

±âŸ

                  infofile "/var/lib/amanda/SpaceWar/curinfo"
                  logdir   "/var/log/amanda/SpaceWar/log"
                  indexdir "/var/lib/amanda/SpaceWar/index"
                  tapelist "/var/lib/amanda/SpaceWar/tapelist"
		


6.4. /etc/amanda/SpaceWar/disklist ÆÄÀÏ ¼³Á¤

disklist ÆÄÀÏ¿¡´Â ¹é¾÷ÇÒ µ¥ÀÌŸ¸¦ °®°í ÀÖ´Â ÆÄÀϼ­¹öÀÇ hostname°ú ¹é¾÷ÇÒ µð·ºÅ丮°¡ ÀúÀåµÇ¾î ÀÖ´Ù.

        gmfs1	/SpaceWar1/Program-Sources	always-full
        gmfs1	/SpaceWar1/Graphic-Sources	always-full
        gmfs2	/SpaceWar2/Protype		always-full
        gmfs2	/SpaceWar2/Schedule		always-full
      

ù ÁÙÀ» »ìÆ캸ÀÚ. gmfs1Àº ÆÄÀϼ­¹öÀÇ È£½ºÆ®³×ÀÓÀÌ°í, /SpaceWar1/Program-SourcesÀº gmfs1¿¡ ÀÖ´Â ¹é¾÷ÇÒ µð·ºÅ丮À̸ç always-fullÀº À§¿¡¼­ ¼³Á¤Çß´ø dumptypeÀÌ´Ù. ÀÌ¿Í °°Àº ÇüÅ·Π¹é¾÷ÇÒ µð·ºÅ丮¸¦ disklist ÆÄÀÏ¿¡ Àû¾îÁÖ¸é µÈ´Ù. ±× ¿Ü¿¡ spindle °ª°ú interface¸¦ ÁöÁ¤ÇÒ ¼ö ÀÖÀ¸´Ï Amanda man page¸¦ Âü°íÇϱ⠹ٶõ´Ù.


7. ÁÖ¿ä AMANDA ¸í·É¾î

amlabel

Å×ÀÙ¿¡ ¶óº§À» ½á ³Ö´Â´Ù.

amlabel "configure name" "label"
/etc/amanda¹Ø¿¡ ¸¸µé¾îÁø SpaceWar¶ó´Â µð·ºÅ丮°¡ configure nameÀÌ µÇ¸ç /etc/amanda/SpaceWar/amanda.conf¿¡ Á¤ÀÇµÈ labelstrÀÌ labelÀÌ µÉ °ÍÀÌ´Ù.
$ amlabel SpaceWar SpaceWar-001
¹Ìµð¾î üÀÎÀú°¡ ÀÖ°í Á¦´ë·Î ¼³Á¤ÀÌ µÇ¾î ÀÖ´Ù°í ÇÒ °æ¿ì, ù¹ø° slot¿¡ ÀÖ´Â Å×ÀÙ¿¡ ¶óº§À» ½á ³Ö´Â´Ù¸é,
$ amlabel SpaceWar SpaceWar-001 slot 1

amcheck

¼³Á¤¿¡ ¹®Á¦°¡ ¾ø´Â Áö Á¡°ËÀ» ÇØ ÁØ´Ù.

$ amcheck SpaceWar

amadmin

¾î¶² ¶óº§À» °¡Áø Å×ÀÙÀ» Àç »ç¿ëÇÒ °ÍÀÎÁö ¾È ÇÒ °ÍÀÎÁö, ´ÙÀ½¿¡ »ç¿ëÇÒ Å×ÀÙÀº ¾î¶² ¶óº§À» °¡Áø °ÍÀÎÁö µîµî ¿©·¯°¡Áö ÀÛ¾÷À» ÇÒ ¼ö ÀÖ´Ù.

SpaceWarÀÇ ¹é¾÷¿¡ »ç¿ëµÉ Å×ÀÙÀÇ ¸ñ·ÏÀ» º¸¿©ÁØ´Ù.

$ amadmin SpaceWar tape
SpaceWar-001À̶ó´Â ¶óº§À» °¡Áø Å×ÀÙÀ» ¹é¾÷¿¡ »ç¿ëÇÏÁö ¾Êµµ·Ï ¼³Á¤ÇÑ´Ù.
$ amadmin SpadeWar no-reuse SpaceWar-001
SpaceWar-001À̶ó´Â ¶óº§À» °¡Áø Å×ÀÙÀ» ¹é¾÷¿¡ »ç¿ëµµ·Ï ¼³Á¤ÇÑ´Ù.
$ amadmin SpadeWar reuse SpaceWar-001

amdump

½ÇÁ¦ ¹é¾÷À» ½ÇÇà½ÃŲ´Ù.

$ amdump SpaceWar

amstatus

¹é¾÷À» ½ÇÇà½ÃŲ ÈÄ ÁøÇà »óȲÀ» ¸ð´ÏÅÍ ÇÑ´Ù.

$ amstatus SpaceWar

amrecover, amrestore

¹é¾÷µÈ µ¥ÀÌŸ¸¦ º¹¿øÇÑ´Ù. rootÀÇ ±ÇÇÑÀ¸·Î ½ÇÇà½ÃŲ´Ù.

# amrecover SpaceWar

amflush

¹é¾÷µÈ µ¥ÀÌŸ°¡ ¾î¶² ÀÌÀ¯·Î Å×ÀÙ¿¡ ¿Å°ÜÁöÁö ¾Ê°í ·ÎÄõð½ºÅ© ¿¡ ÀúÀåµÈ °ÍÀ» Å×ÀÙÀ¸·Î ´Ù½Ã ¿Å±â°íÀÚ ÇÒ ¶§ »ç¿ëÇÑ´Ù.

$ amflush SpaceWar

amcleanup

½ÇÆÐÇÑ ¹é¾÷ÀÌ ÀÖÀ» ¶§ À̸¦ û¼ÒÇϱâ À§ÇØ »ç¿ëµÈ´Ù.

$ amcleanup SpaceWar

amdump ¸í·ÉÀ¸·Î ¹é¾÷À» ½ÇÇà½ÃÄ×À¸³ª ¾î¶² ÀÌÀ¯·Î ¹é¾÷¿¡ ½ÇÆÐÇÑ °æ¿ì, ¹Ýµå½Ã amcleanup ¸í·ÉÀ¸·Î °ü·Ã ÆÄÀÏÀ» û¼ÒÇØ ÁÖ¾î¾ßÇÑ´Ù. ±×¸®°í ·ÎÄõð½ºÅ©¿¡ Àӽ÷ΠÀúÀåµÇ¾î ÀÖ´Â ¹é¾÷ µ¥ÀÌŸµµ Áö¿ö ÁÖ¾î¾ß ÇÑ´Ù.

À§¿¡¼­ ¿­°ÅÇÑ ¸í·É¾î´Â 8절¿¡¼­ ÀÚ¼¼È÷ »ìÆ캼 °ÍÀÌ´Ù. ³ª¸ÓÁö ¸í·É¾î¿¡ ´ëÇÑ °ÍÀº Amanda man page¸¦ Âü°íÇϱ⠹ٶõ´Ù.


8. AMANDA¸¦ ÀÌ¿ëÇÑ ½ÇÀü ¹é¾÷

¸î °¡Áö °¡Á¤À» ÇÏ°í ½ÇÁ¦ ¹é¾÷À» ÇØ º¸ÀÚ.

  • Amanda ÆÐÅ°Áö´Â 2절¿¡¼­ ¼³¸íÇÑ´ë·Î configureÀÇ »ç¿ëÀÚ ¿É¼ÇÀ» ¹Ù²Ù¾î¼­ ¼³Ä¡ÇÑ´Ù.

  • Å×ÀÙ ÀåÄ¡°¡ Á¦´ë·Î ÀÛµ¿ÇÑ´Ù.

  • Å×ÀÙ ÀåÄ¡´Â IBM 3581 autoloader¸¦ »ç¿ëÇÑ´Ù.

  • ¹é¾÷À» ½ÇÇàÇÒ Å×ÀÙ¼­¹öÀÇ »ç¿ëÀÚ´Â styooÀÌ´Ù.

  • SpaceWar¶ó´Â ÇÁ·ÎÁ§Æ®ÀÇ µ¥ÀÌŸ¸¦ ¹é¾÷ÇÑ´Ù.

  • Å×ÀÙ¼­¹öÀÇ È£½ºÆ®³×ÀÓÀº backupsvrÀÌ´Ù.

  • ÇÁ·ÎÁ§Æ® SpaceWarÀÇ µ¥ÀÌŸ´Â ÆÄÀϼ­¹ö gmfs1°ú gmfs2¿¡ ÀúÀåµÈ´Ù.

  • gmfs1ÀÇ OS´Â À©µµ¿ì 2000 ServerÀÌ°í, gmfs2´Â ¸®´ª½ºÀÌ´Ù.

  • ÇÁ·ÎÁ§Æ® SpaceWar¿Í °ü·ÃµÈ °¢ ÆÄÀϼ­¹öÀÇ µð·ºÅ丮´Â ¾Æ·¡¿Í °°´Ù.

              gmfs1 :   E:\SpaceWar1\Program-Sources
              gmfs1 :   E:\SpaceWar1\Graphic-Sources
              gmfs2 :   /SpaceWar2/Prototype
              gmfs2 :   /SpaceWar2/Schedule
            

  • gmfs1ÀÇ E:\SpaceWar1 µð·ºÅ丮¸¦ backupsvrÀÇ /SpaceWar1µð·ºÅ丮¿¡ SMB ¸¶¿îÆ®ÇÑ´Ù.

ÆÄÀϼ­¹ö¿Í Å×ÀÙ¼­¹ö´Â ¼­·Î È£½ºÆ®³×ÀÓÀ» ¾Ë ¼ö ÀÖµµ·Ï /etc/hosts ÆÄÀÏ¿¡ ±â·ÏÇØ µÎ´Â °ÍÀÌ ÁÁ´Ù.


8.1. ½ÇÀü ¹é¾÷¿ë /etc/amanda/amanda.conf ÆÄÀÏ

        mailto "styoo"

        dumpuser "styoo"

        etimeout 3600
        dtimeout 3600

        tapedev "/dev/nst0"

        tpchanger "mtx-changer"

        tapetype IBM-LTO

        columnspec "HostName=0:13,Disk=1:40,OrigKB=1:9,OutKB=1:9,DumpRate=1:7,TapeRate=1:7"

        holdingdisk hd1 {
            comment "main holding disk"
            directory "/backup-image/Image"
            use -10Mb
            chunksize 0
            }

        define tapetype IBM-LTO {
        comment "just produced by tapetype program"
        length 101376 mbytes
        filemark 0 kbytes
        speed 13500 kps
        }

        define dumptype global {
            program "GNUTAR"
            compress server fast
            index yes
            record yes
        }        
      

autoloader¸¦ ±¸µ¿Çϴµ¥ »ç¿ëÇÒ mtx-changer ½ºÅ©¸³Æ®´Â mtx ÆÐÅ°Áö¿¡ Æ÷ÇԵǾî ÀÖ´Â °ÍÀ» »ç¿ëÇÏ¿´À¸³ª, IBM 3581 autoloader¿¡ Àû¿ëÇϱ⿡´Â ÀϺΠÀÛµ¿¿¡ ¹®Á¦°¡ ÀÖ¾î ÇÊÀÚ°¡ ÀϺθ¦ ¼öÁ¤ÇÏ¿´´Ù. ¼öÁ¤µÈ ½ºÅ©¸³Æ®´Â ¿¡ ÀÖÀ¸´Ï 10절À» Âü°íÇϱ⠹ٶõ´Ù.


8.2. ½ÇÀü ¹é¾÷¿ë /etc/amanda/SpaceWar/amanda.conf ÆÄÀÏ

        includefile "/etc/amanda/amanda.conf"

        org "SpaceWar"

        inparallel 4

        runtapes 2

        dumpcycle 4 weeks

        runspercycle 4

        tapecycle 4 tapes

        maxdumps 4

        labelstr "^SpaceWar-[0-9][0-9][0-9]*$"

        infofile "/var/lib/amanda/SpaceWar/curinfo"
        logdir   "/var/log/amanda/SpaceWar/log"
        indexdir "/var/lib/amanda/SpaceWar/index"
        tapelist "/var/lib/amanda/SpaceWar/tapelist"

        define dumptype always-full {
            global
            comment "Full dump of this filesystem always"
            priority high
            dumpcycle 0
        }

        define dumptype incr-only {
            global
            comment "Incremental dump only"
            priority high
            strategy nofull
        }
      


8.3. ½ÇÀü ¹é¾÷¿ë /etc/amanda/SpaceWar/disklist ÆÄÀÏ

        localhost   /SpaceWar1/Program-Sources      always-full
        localhost   /SpaceWar1/Graphic-Sources      always-full
        gmfs2       /SpaceWar2/Prototype            always-full
        gmfs2       /SpaceWar2/Schedule             always-full
      

/Spacewar1ÀÇ ÇÏÀ§ µð·ºÅ丮´Â À©µµ¿ì 2000 ¼­¹öÀÎ gmfs1¿¡ ÀÖÀ¸¹Ç·Î samba¸¦ ÀÌ¿ëÇÏ¿© ¹é¾÷ÇØ¾ß ÇÑ´Ù. amanda´Â À©µµ¿ì ¸Ó½ÅÀÇ µ¥ÀÌŸ¸¦ ¹é¾÷Çϱâ À§ÇØ smbclient¸¦ »ç¿ëÇÏ¿© ¹é¾÷À» ÁøÇàÇÑ´Ù. ±×·¯³ª ±×·¸°Ô ÇÏÁö ¾Ê°í, À©µµ¿ìÀÇ µð½ºÅ©¸¦ Å×ÀÙ¼­¹ö¿¡ SMB ¸¶¿îÆ®ÇÏ¿© ¸¶Ä¡ ·ÎÄõð½ºÅ©¸¦ ¹é¾÷ÇϵíÀÌ ÇÒ ¼öµµ ÀÖ´Ù. ¿©±â¼­´Â SMB ¸¶¿îÆ®ÇÏ¿© ·ÎÄõð½ºÅ©¸¦ ¹é¾÷ÇϵíÀÌ ÇÒ °ÍÀÌ´Ù. samba¸¦ ÀÌ¿ëÇÏ¿© ¹é¾÷À» ÁøÇàÇÑ´Ù¸é, localhost¸¦ gmfs1À¸·Î ¹Ù²Ù°í /etc/amandapass ÆÄÀÏ¿¡ °øÀ¯À̸§°ú ÇØ´ç °øÀ¯¸¦ ¾×¼¼½º ÇÒ ¼ö ÀÖ´Â »ç¿ëÀÚ ±×¸®°í ¾ÏÈ£¸¦ Àû¾îÁÖ¾î¾ß ÇÑ´Ù. ±× Æ÷¸ËÀº Amanda man page¸¦ Âü°íÇϱ⠹ٶõ´Ù.


8.4. ¹é¾÷ ½ÃÀÛ

¹é¾÷À» ÁøÇàÇÒ »ç¿ëÀÚ´Â styooÀÌ¸ç °ü·ÃµÈ ÆÄÀÏ¿¡ ´ëÇÑ ¾²±â ±ÇÇÑÀÌ ÀÖ¾î¾ß ÇÔÀº µÎ ¸»ÇÒ ³ªÀ§µµ ¾ø´Ù. /etc/amandaµð·ºÅ丮 ¹× ±× ÇÏÀ§ µð·ºÅ丮¿Í ÆÄÀÏ¿¡ ´ëÇÑ Àб⾲±â ±ÇÇÑÀÌ styoo¿¡°Ô ÀÖ¾î¾ß ÇÒ °ÍÀÌ´Ù. »Ó¸¸ ¾Æ´Ï¶ó, /var/lib/amanda µð·ºÅ丮 ¹× ±× ÇÏÀ§ÀÇ ÆÄÀÏµé ±×¸®°í /var/log/amanda µð·ºÅ丮 ¹× ±× ÇÏÀ§ÀÇ ÆÄÀϵ鿡 ´ëÇÑ Àб⾲±â ±ÇÇÑÀÌ ÇÊ¿äÇÏ´Ù. ¶ÇÇÑ, /dev/nst0, /dev/sg0¿¡ ´ëÇÑ Àб⾲±â ±ÇÇѵµ ´ç¿¬È÷ ÀÖ¾î¾ß ÇÒ °ÍÀÌ´Ù.

ÀÌÁ¦, ¹é¾÷À» ÁøÇàÇØ º¸ÀÚ. Amanda¸¦ ¼³Ä¡ÇÏ°í À§¿Í °°ÀÌ ¼³Á¤À» ³¡¸¶Ä£ ÈÄ Amanda ¸í·É¾î¸¦ ÀÌ¿ëÇÏ¿© ¹é¾÷À» ÁøÇàÇÒ ¶§ ÈçÈ÷ ¹ß»ýÇÒ ¼ö ÀÖ´Â ¿¡·¯ »óȲµµ ÇÔ²² Ãë±ÞÇÒ °ÍÀÌ´Ù.

Å×ÀÙ ÀåÄ¡¿¡ ºó Å×ÀÙÀ» Çϳª ³Ö°í amlabel ¸í·ÉÀ¸·Î Å×ÀÙ¿¡ ¶óº§À» ºÙÀÌÀÚ. -f ¿É¼ÇÀ» ºÙ¿©¼­ °­Á¦·Î ¶óº§À» ½á ³Öµµ·Ï ÇÏÀÚ.

        $ amlabel -f SpaceWar SpaceWar-001
        rewinding, reading label, not an amanda tape
        rewinding, writing label SpaceWar-001, checking label
        amlabel: couldn't write tapelist: No such file or directory
      
tapelist ÆÄÀÏÀÌ ¾ø´Ù°í ºÒÆòÀ» ÇÑ´Ù. ÀÌ°ÍÀº /var/lib/amanda/SpaceWar µð·ºÅ丮°¡ ¾ø±â ¶§¹®ÀÌ´Ï /var/lib/amanda/ µð·ºÅ丮¿¡ SpaceWar µð·ºÅ丮¸¦ ¸¸µé¾î ÁÖ¸é µÈ´Ù. ÀÌ·¸°Ô ÇØ ÁÖ¸é amlabel ¸í·ÉÀÌ ±× ¹Ø¿¡ tapelist ÆÄÀÏÀ» ÀÚµ¿À¸·Î ¸¸µç´Ù.

Å×ÀÙ¿¡ ¶óº§À» ½á ³ÖÀº ÈÄ, amadmin ¸í·ÉÀ¸·Î »ç¿ëÇÒ Å×ÀÙ ¸ñ·ÏÀ» »ìÆ캸ÀÚ.

        $ amadmin SpaceWar tape
        The next Amanda run should go onto a new tape.
        The next Amanda run should go onto a new tape.
      
amlabel ¸í·ÉÀ¸·Î SpaceWar-004±îÁö Å×ÀÙ¿¡ ¶óº§À» ºÙ¿© º¸ÀÚ. ±×¸®°í¼­ /var/lib/amanda/SpaceWar/tapelist ÆÄÀÏÀ» º¸¸é ´ÙÀ½°ú °°ÀÌ µÇ¾î ÀÖÀ» °ÍÀÌ´Ù.
        0 SpaceWar-004 reuse
        0 SpaceWar-003 reuse
        0 SpaceWar-002 reuse
        0 SpaceWar-001 reuse 
      
amadmin ¸í·ÉÀ¸·Î »ç¿ëÇÒ Å×ÀÙ ¸ñ·ÏÀ» ´Ù½Ã ÇÑ ¹ø »ìÆ캸ÀÚ.
        $ amadmin SpaceWar tape
        The next Amanda run should go onto tape SpaceWar-001 or a new tape.
        The next Amanda run should go onto tape SpaceWar-002 or a new tape.
      
runtapes°ú tapecycleÀÇ °ª¿¡ µû¶ó¼­ ±×¸®°í tapelist ÆÄÀÏÀÇ ³»¿ë¿¡ µû¶ó¼­ À§ ¸í·ÉÀÇ °á°ú´Â ´Þ¶óÁø´Ù. ÇÑ ¹ø üũÇØ º¸±â ¹Ù¶õ´Ù.

amcheck ¸í·ÉÀ¸·Î ¼³Á¤¿¡ ÀÌ»óÀÌ ¾ø´ÂÁö È®ÀÎÇØ º¸ÀÚ. µ¥ºñ¾ÈÀÇ °æ¿ì, amanda ¸í·É¾îµéÀÌ /usr/sbin µð·ºÅ丮¿¡ Àִµ¥ amcheck ¸í·ÉÀÇ ½ÇÇà ±ÇÇÑÀÌ root¿Í backup¿¡°Ô¸¸ ÀÖÀ» ¼öµµ ÀÖÀ¸´Ï ½ÇÇà ±ÇÇÑÀ» Ãß°¡ÇØ ÁÖ¾î¾ß ÇÒ °ÍÀÌ´Ù.

        $ amcheck SpaceWar
        ERROR: program /usr/lib/amanda/planner: not executable
        Holding disk /backup-image/Image: 6636356 KB disk space available, using 6626116 KB
        ERROR: log dir /var/log/amanda/SpaceWar: not writable
        NOTE: skipping tape-writable test
        Tape SpaceWar-001 label ok
        NOTE: info dir /var/lib/amanda/SpaceWar/curinfo: does not exist
        NOTE: it will be created on the next run
        NOTE: index dir /var/lib/amanda/SpaceWar/index: does not exist
        Server check took 0.010 seconds

        Amanda Backup Client Hosts Check
        --------------------------------
        ERROR: gmfs2: [access as styoo not allowed from styoo@backupsvr] amandahostsauth failed
        WARNING: localhost: selfcheck request timed out.  Host down?
        Client check: 2 hosts checked in 30.018 seconds, 2 problems found
      
¸î °¡Áö ¿¡·¯¿Í °æ°í ¸Þ¼¼Áö°¡ º¸ÀδÙ. Çϳª¾¿ »ìÆ캸ÀÚ.

  • "ERROR: program /usr/lib/amanda/planner: not executable" ¿©±â¼­ planner¶ó´Â °ÍÀº amdump ¸í·É¾î°¡ ½ÇÇàµÈ ÈÄ amdumpÀÇ ºÎ¸§À» ¹Þ°í ½ÇÇàµÇ´Â ¸í·É¾îÀÌ´Ù. ÀÌ ¿Ü¿¡µµ ¸î °¡Áö ´Ù¸¥ ¸í·É¾î°¡ Àִµ¥ µ¥ºñ¾ÈÀÇ °æ¿ì, ÀÌµé ¸í·É¾î´Â /usr/lib/amanda µð·ºÅ丮¿¡ Á¸ÀçÇÑ´Ù. ½ÇÇà ±ÇÇÑÀÌ root ¶Ç´Â backup¿¡°Ô¸¸ ÀÖÀ» ¼ö ÀÖÀ¸´Ï ´Ù¸¥ »ç¿ëÀÚ¿¡°Ô ½ÇÇà ±ÇÇÑÀÌ ¾ø´Â ¸í·É¾î¸¦ ã¾Æ¼­ ½ÇÇà ±ÇÇÑÀ» ºÎ¿©ÇØ¾ß ÇÒ °ÍÀÌ´Ù.

  • "ERROR: log dir /var/log/amanda/SpaceWar: not writable" ÀÌ°ÍÀº SpaceWar µð·ºÅ丮°¡ ¾ø±â ¶§¹®ÀÌ´Ï µð·ºÅ丮¸¦ ¸¸µé¾î ÁØ´Ù. ±× ¹Ø¿¡ Ç¥½ÃµÈ curinfo¿Í index°¡ ¾ø´Ù´Â ¸Þ¼¼Áöµµ ¸¶Âù°¡Áö·Î /var/lib/amanda µð·ºÅ丮 ¹Ø¿¡ SpaceWar¸¦ ¸¸µé¾î ÁØ´Ù.

  • "ERROR: gmfs2: [access as styoo not allowed from styoo@backupsvr] amandahostsauth failed" ÀÌ ¸Þ¼¼Áö´Â backupsvrÀÇ »ç¿ëÀÚ styoo¿¡°Ô ÆÄÀϼ­¹ö gmfs2(¸®´ª½º ¸Ó½®ÀÓ)ÀÇ amandad¿¡ Á¢±ÙÇÒ ±ÇÇÑÀÌ ¾ø±â ¶§¹®¿¡ ¹ß»ýÇÑ´Ù. gmfs2ÀÇ /etc/amandahosts ÆÄÀÏ¿¡

                  backupsvr styoo
    	    
    ¶ó°í ÇÑ ÁÙÀ» ³Ö¾îÁÖ¸é µÉ °ÍÀÌ´Ù.

  • "WARNING: localhost: selfcheck request timed out. Host down?" ÀÌ ¸Þ¼¼Áö´Â amandad(Amanda µ¥¸ó)°¡ ´Ù¸¥ »ç¿ëÀÚÀÇ ±ÇÇÑÀ¸·Î ½ÇÇàµÇ¾ú±â ¶§¹®ÀÌ´Ù. /etc/inetd.confÀ» ¿­¾îº¸¸é ¾Æ·¡¿Í °°Àº ³»¿ëÀÌ ÀÖÀ» °ÍÀÌ´Ù.

                  amanda dgram udp wait backup /usr/sbin/tcpd /usr/lib/amanda/amandad
                  amandaidx stream tcp nowait backup /usr/sbin/tcpd /usr/lib/amanda/amindexd
                  amidxtape stream tcp nowait backup /usr/sbin/tcpd /usr/lib/amanda/amidxtaped
    	    
    À§¿¡¼­ backupÀ» ½ÇÁ¦ ¹é¾÷À» ½ÇÇàÇÏ´Â »ç¿ëÀÚ(¿©±â¼­´Â styoo)·Î ¹Ù²Ù¾î ÁØ ÈÄ inetd¸¦ Àç ½Ãµ¿ ½ÃÅ°¸é µÉ °ÍÀÌ´Ù.

  • À§ ¹®Á¦°¡ ÇØ°áµÇ¸é ´ÙÀ½°ú °°Àº ¿¡·¯°¡ ¹ß»ýÇÒ ¼öµµ ÀÖ´Ù. "ERROR: localhost: [access as styoo not allowed from styoo@localhost] open of /home/styoo/.amandahosts failed" ÀÌ°ÍÀº ¸» ±×´ë·Î /home/styoo/.amandahostsÀ» ¿­ ¼ö ¾ø´Ù´Â ¶æÀÌ´Ù. /etc/amandahosts ÆÄÀÏÀ» /home/styoo/.amandahosts¿¡ ¸µÅ©¸¦ ½ÃÄÑÁÖ¸é µÈ´Ù.

  • À§ ¹®Á¦°¡ ÇØ°áµÇ¸é ´ÙÀ½°ú °°Àº ¿¡·¯°¡ ¹ß»ýÇÒ ¼öµµ ÀÖ´Ù. "ERROR: localhost: [access as styoo not allowed from styoo@localhost] amandahostsauth failed" ÀÌ°ÍÀº gmfs2¿¡ Á¢±ÙÇÒ ¼ö ¾ø´Ù´Â ¿¡·¯¿Í À¯»çÇÑ °ÍÀ¸·Î Å×ÀÙ¼­¹ö(backupsvr)ÀÇ /etc/amandahosts ÆÄÀÏ¿¡

                  localhost styoo
                
    ¶ó°í ÇÑ ÁÙÀ» ³Ö¾îÁÖ¸é µÉ °ÍÀÌ´Ù.

  • autoloader¿Í °°Àº ¹Ìµð¾î üÀÎÀú°¡ ¾ø´Â °æ¿ì, ´ÙÀ½°ú °°Àº °æ°í ¸Þ¼¼Áö°¡ ³ªÅ¸³¯ ¼öµµ ÀÖ´Ù. "WARNING: if a tape changer is not available, runtapes must be set to 1" ÀÌ°ÍÀº autoloader¿Í °°Àº ¹Ìµð¾î üÀÎÀú°¡ ¾ø±â ¶§¹®¿¡ runtape ÆĶó¸ÞŸ °ªÀÌ 1·Î ¼¼ÆõǾî¾ß ÇÑ´Ù´Â ¶æÀÌ´Ù. ÇöÀç´Â 2·Î ¼³Á¤µÇ¾î ÀÖ´Ù. ÀÌ °æ°í´Â ¹«½ÃÇصµ ÁÁ´Ù.

amcheck ¸í·ÉÀ¸·Î ÀÌ»óÀÌ ¾ø´Â °ÍÀ» È®ÀÎÇÏ¿´À¸¸é, ÀÌÁ¦ ¹é±×¶ó¿îµå·Î amdump ¸í·ÉÀ» ½ÇÇà½ÃÄÑ ¹é¾÷À» ÇØ º¸ÀÚ.

        $ amdump SpaceWar &
      
amstatus ¸í·ÉÀ¸·Î ¹é¾÷ »óȲÀ» È®ÀÎÇØ º¸ÀÚ.
        $ amstatus SpaceWar

        Using /var/log/amanda/SpaceWar/amdump from Åä  9¿ù 14 14:51:50 KST 2002

        localhost:/SpaceWar1/Program-Sources                getting estimate
        localhost:/SpaceWar1/Graphic-Sources                getting estimate
        gmfs2:/SpaceWar2/Prototype                          getting estimate
        gmfs2:/SpaceWar2/Schedule                           getting estimate



        SUMMARY          part     real estimated
                          size      size
        partition       :   4
        estimated       :   0                  0k
        failed          :   0                  0k           (  0.00%)
        wait for dumping:   0                  0k           (  0.00%)
        dumping to tape :   0                  0k           (  0.00%)
        dumping         :   0        0k        0k (  0.00%) (  0.00%)
        dumped          :   0        0k        0k (  0.00%) (  0.00%)
        wait for writing:   0        0k        0k (  0.00%) (  0.00%)
        writing to tape :   0        0k        0k (  0.00%) (  0.00%)
        failed to tape  :   0        0k        0k (  0.00%) (  0.00%)
        taped           :   0        0k        0k (  0.00%) (  0.00%)
        all dumpers active
        taper idle
      
¹é¾÷ÇÒ µð·ºÅ丮ÀÇ ¿ë·®À» °è»êÇÏ°í ÀÖ´Â ÁßÀÌ´Ù. Àá½Ã ÈÄ¿¡ ´Ù½Ã ÇÑ ¹ø amstatus ¸í·ÉÀ» ½ÇÇà½ÃÄѺ¸ÀÚ.
        $ amstatus SpaceWar
          Using /var/log/amanda/SpaceWar/amdump from Åä  9¿ù 14 15:06:33 KST 2002

          localhost:/SpaceWar1/Program-Sources     0 no estimate
          localhost:/SpaceWar1/Graphic-Sources     0 no estimate
          gmfs2:/SpaceWar2/Prototype               0 [dump larger than tape, but cannot incremental dump new disk]
          gmfs2:/SpaceWar2/Schedule                0 14585k dumping     4832k ( 33.13%) (15:06:36)

          SUMMARY          part     real estimated
                          size      size
          partition       :   4
          estimated       :   2              14585k
          failed          :   3                  0k           (  0.00%)
          wait for dumping:   0                  0k           (  0.00%)
          dumping to tape :   0                  0k           (  0.00%)
          dumping         :   1     4832k    14585k ( 33.13%) (  6.42%)
          dumped          :   0        0k        0k (  0.00%) (  0.00%)
          wait for writing:   0        0k        0k (  0.00%) (  0.00%)
          writing to tape :   0        0k        0k (  0.00%) (  0.00%)
          failed to tape  :   0        0k        0k (  0.00%) (  0.00%)
          taped           :   0        0k        0k (  0.00%) (  0.00%)
          3 dumpers idle  : start-wait
          taper idle
          network free kps:      270
          holding space   :  6611460k ( 99.78%)
      
À§ÀÇ °á°ú¸¦ º¸¸é, gmfs2ÀÇ µð·ºÅ丮 Áß¿¡¼­ /SpaceWar2/ScheduleÀº ¹º°¡°¡ ÁøÇàµÇ°í Àִµ¥, /SpaceWar2/PrototypeÀº dump°¡ Å×ÀÙº¸´Ù Å©´Ù°í ¸»À» ÇÏ°í ÀÖ´Ù. ÀÌ°ÍÀº /SpaceWar2/PrototypeÀÇ ¿ë·®ÀÌ Å©´Ù±â º¸´Ù´Â °¢ µð·ºÅ丮¿¡ ´ëÇÑ ¹é¾÷ ¿ë·®À» ¸ðµÎ ÇÕ»êÇÑ °á°ú ¹é¾÷ÇÒ ¿ë·®ÀÌ <Å×ÀÙ ÇÑ °³ÀÇ ¿ë·® X runtapesÀÇ °ª> º¸´Ù Å©´Ù´Â ¶æÀÌ´Ù. runtapesÀÇ °ªÀ» Áõ°¡ ½ÃÅ°¸é ´ëºÎºÐ ÇØ°áµÉ °ÍÀÌ´Ù. ¹°·Ð, ½ÇÁ¦·Î µð·ºÅ丮 ÇϳªÀÇ ¹é¾÷ ¿ë·®ÀÌ Å×ÀÙ ÇÑ °³ÀÇ ¿ë·® º¸´Ù Ŭ ¼öµµ ÀÖ´Ù. ±×·¯³ª Amanda´Â À̸¦ ¹®Á¦ »ïÁö´Â ¾Ê´Â´Ù. ±×·¸´Ù°í ¾î¶² µð·ºÅ丮¿¡ ´ëÇÑ ¹é¾÷À̹ÌÁö°¡ Å×ÀÙ ÇϳªÀÇ Å©±â º¸´Ù Å©´Ù°í Çؼ­ ´ÙÀ½ Å×ÀÙ¿¡ À̾ ¼ö´Â ¾ø´Ù. Amanda´Â ´ÙÀ½ Å×ÀÙ¿¡ À̾±â¸¦ Áö¿øÇÏÁö ¾ÊÀ½À» ¸í½ÉÇϱ⠹ٶõ´Ù. Amanda ÆÐÅ°ÁöÀÇ FAQ ¹®¼­¸¦ Âü°íÇϱ⠹ٶõ´Ù.

±×¸®°í À©µµ¿ì ¼­¹ö gmfs1ÀÇ µð·ºÅ丮¸¦ SMB ¸¶¿îÆ®ÇÑ µð·ºÅ丮´Â "no estimate" ¶ó°í µÇ¾î ÀÖ´Ù. ÀÌ ¹®Á¦´Â ´ë°³´Â ÆÛ¹Ì¼Ç ¹®Á¦ÀÌ´Ù. Amanda ÆÐÅ°Áö¸¦ ºôµåÇÒ ¶§ styoo¶ó´Â »ç¿ëÀÚ·Î ¿É¼ÇÀ» ÁÖ¾ú´Âµ¥, ¸·»ó ½ÇÇàÇÒ ¶§´Â ¾û¶×ÇÑ »ç¿ëÀÚ·Î amdump¸¦ ½ÇÇàÇ߱⠶§¹®ÀÌ´Ù. Á¦°øµÇ´Â ÆÐÅ°Áö ±×´ë·Î ¼³Ä¡Çß´Ù¸é root ¶Ç´Â backup »ç¿ëÀÚÀÇ ±ÇÇÑÀ¸·Î ¹é¾÷À» ½ÇÇàÇØ¾ß ÇÒ °ÍÀÌ´Ù.

À¢¸¸ÇÑ ¿¡·¯ »óȲÀº üũ¸¦ ÇßÀ¸´Ï ¹é¾÷ÀÌ Àß ¿Ï·áµÇ¾ú´Ù°í ÇÏÀÚ. ±×¸®°í 1 °³ÀÇ Å×ÀÙÀ» ¹é¾÷¿¡ »ç¿ëÇß´Ù°í ÇÏÀÚ. ÀÌÁ¦ ´Ù½Ã ÇÑ ¹ø amadmin ¸í·ÉÀ¸·Î »ç¿ëÇÒ ¼ö ÀÖ´Â Å×ÀÙ ¸ñ·ÏÀ» »ìÆ캸ÀÚ.

        $ amadmin SpaceWar tape
	The next Amanda run should go onto tape SpaceWar-002 or a new tape.
	The next Amanda run should go onto tape SpaceWar-003 or a new tape.
      
´ÙÀ½ ¹é¾÷¿¡´Â SpaceWar-002 Å×ÀÙºÎÅÍ »ç¿ëÇÏ°Ô µÉ °ÍÀÌ´Ù. ´ÙÀ½ ¹ø(µÎ¹ø°) ¹é¾÷¿¡µµ 1 °³ÀÇ Å×ÀÙÀ» »ç¿ëÇÑ´Ù¸é ¼¼¹ø° ¹é¾÷¿¡´Â SpaceWar-003 Å×ÀÙÀ» »ç¿ëÇÒ °ÍÀÌ´Ù. ±× ´ÙÀ½Àº SpaceWar-004, ±× ´ÙÀ½Àº? ±×·¸´Ù. ´Ù½Ã µ¹¾Æ¿Í¼­ SpaceWar-001À» »ç¿ëÇÏ°Ô µÈ´Ù. ´Ù¼¸¹ø° ¹é¾÷¿¡ µé¾î°¡±â Àü¿¡ ¾Æ·¡¿Í °°ÀÌ amadmin ¸í·ÉÀ¸·Î SpaceWar-001 Å×ÀÙÀ» ¹é¾÷¿¡ »ç¿ëÇÏÁö ¸øÇÏ°Ô ÇØ ³õ¾Ò´Ù¸é, SpaceWar-002 Å×ÀÙÀ» »ç¿ëÇÒ °ÍÀÌ´Ù.
        amadmin SpaceWar no-reuse SpaceWar-001
      
Å×ÀÙ ¼ø¼­¿¡ ´ëÇÑ ´õ ÀÚ¼¼ÇÑ °ÍÀº amanda¸¦ »ç¿ëÇϸ鼭 ÀÍÈ÷±â ¹Ù¶õ´Ù.

¹é¾÷µÈ µ¥ÀÌŸ¸¦ Å×ÀÙ¿¡ ¾²´Â Áß¿¡ ¿¡·¯°¡ ¹ß»ýÇÑ´Ù¸é ´ÙÀ½ Å×ÀÙ¿¡ µ¥ÀÌŸ¸¦ ´Ù½Ã ½á ³ÖÀ¸·Á ÇÒ °ÍÀÌ´Ù. ±×·¯³ª »ç¿ëÇÒ ´ÙÀ½ Å×ÀÙÀÌ ¾ø´Ù¸é ¹é¾÷ µ¥ÀÌŸ´Â ·ÎÄõð½ºÅ©¿¡ ³²°ÔµÇ¸ç ¹é¾÷Àº Á¾·áµÈ´Ù. ÀÌ·± °æ¿ì¿¡´Â »õ·Î¿î Å×ÀÙÀ» ÁغñÇÏ¿© ¶óº§À» ºÙÀÎ ´ÙÀ½, amflush ¸í·ÉÀ¸·Î ·ÎÄõð½ºÅ©ÀÇ µ¥ÀÌŸ¸¦ Å×ÀÙ¿¡ ¿Å°Ü ³õÀ» ¼ö ÀÖ´Ù.

        $ amflush SpaceWar
      
Å×ÀÙÀ¸·Î µ¥ÀÌŸ¸¦ ¿Å°Ü ¾´ ´ÙÀ½¿¡´Â amcleanup ¸í·ÉÀ¸·Î û¼Ò¸¦ ÇØ ÁÖ¾î¾ß ÇÑ´Ù.
        $ amcleanup SpaceWar
      


8.5. º¹¿øÇϱâ

º¹¿øÀ» ÇØ º¸ÀÚ. º¹¿øÀº amrecover¿Í amrestore µÎ °¡Áö¸¦ ÀÌ¿ëÇÒ ¼ö ÀÖ´Ù. ¿©±â¼­´Â amrecover¸¦ »ç¿ëÇϱâ·Î ÇÑ´Ù. º¹¿øÀº rootÀÇ ±ÇÇÑÀ¸·Î ½ÇÇàµÇ¾î¾ß ÇÑ´Ù.

gmfs2ÀÇ /SpaceWar2/Schedule µð·ºÅ丮 ¹Ø¿¡ ÀÖ´ø 200206-Prog À̶õ µð·ºÅ丮¿Í 200206-Mail µð·ºÅ丮¸¦ ÇÏÀ§ µð·ºÅ丮¸¦ Æ÷ÇÔÇÏ¿© ¸ðµÎ º¹¿øÇÑ´Ù°í ÇÏÀÚ. /tmp¿¡ º¹±¸ÇÑ´Ù°í °¡Á¤ÇÏÀÚ.

        # cd /tmp
        # amrecover SpaceWar -d /dev/nst0
      
À§¿Í °°ÀÌ ¸í·ÉÀ» ÁÖ¸é ´ÙÀ½°ú °°Àº ÇÁ·ÒÇÁÆ®°¡ ³ªÅ¸³¯ °ÍÀÌ´Ù.
amrecover>
¶Ç´Â ¾Æ·¡¿Í °°Àº ¿¡·¯¸Þ¼¼Áö°¡ ³ª¿Ã ¼öµµ ÀÖ´Ù.
	220 backupsvr AMANDA index server (2.4.2p2) ready.
	500 Access not allowed: [access as styoo not allowed from root@localhost] amandahostsauth failed
      
/etc/amandahosts¿¡ ¾Æ·¡¿Í °°ÀÌ root¸¦ µî·ÏÇÑ´Ù.
localhost root
¿¡·¯°¡ Á¦°Å µÇ¾úÀ¸¸é ´Ù½Ã amrecover¸¦ ½ÇÇà½ÃÄÑ /SpaceWar2/ScheduleÀÌ Àִ ȣ½ºÆ®¸¦ ÁöÁ¤ÇÏ°í º¹¿øÇÒ ÃÖ»óÀ§ µð·ºÅ丮¸¦ ÁöÁ¤ÇÑ´Ù.
	amrecover> sethost gmfs2
	amrecover> setdisk /SpaceWar2/Schedule
      
º¹¿øÇÒ ÇÏÀ§ µð·ºÅ丮¸¦ ÁöÁ¤ÇÑ´Ù.
	amrecover> cd 200206-Prog
	amrecover> add *
	amrecover> cd ..
	amrecover> cd 200206-Mail
	amrecover> add *
      
¹°·Ð, ƯÁ¤ ÆÄÀϸ¸ º¹¿øÇÒ ¼öµµ ÀÖ´Ù. ÇØ´ç ÆÄÀÏÀÌ ÀÖ´Â µð·ºÅ丮·Î À̵¿Çؼ­ ÆÄÀÏÀ» Ãß°¡ÇØ ÁÖ¸é µÉ °ÍÀÌ´Ù. º¹¿ø ¸í·ÉÀ» ³»¸°´Ù.
amrecover> extract
ÇÊ¿äÇÑ Å×ÀÙ¿¡ ´ëÇÑ Á¤º¸¸¦ ¾Ë·ÁÁÙ °ÍÀÌ´Ù. ¸ÂÀ¸¸é y¶ó°í ´äÇÑ´Ù. ±×·¯¸é Å×ÀÙÀ» ·ÎµåÇÑ ÈÄ Ã³À½ºÎÅÍ Àоî¸é¼­ ÇØ´ç ÆÄÀÏÀ» Çϳª¾¿ º¹¿øÇÒ °ÍÀÌ´Ù.

¿©±â±îÁö´Â Å×ÀÙ¼­¹öÀÇ Å×ÀÙ ÀåÄ¡¸¦ ÀÌ¿ëÇÏ¿© º¹¿øÇÏ´Â ¹æ¹ýÀÌ´Ù. ±×·¯³ª ÀÌ·± °æ¿ì°¡ ÀÖÀ» ¼öµµ ÀÖ´Ù. ¹Ìµð¿À ȣȯÀÌ °¡´ÉÇÑ µÎ ´ëÀÇ Å×ÀÙ ÀåÄ¡¸¦ °¢°¢ ´Ù¸¥ ¸®´ª½º ¼­¹ö¿¡ ÀåÂøÇÏ¿© ÇÑ ´ë´Â ¹é¾÷ Àü¿ëÀ¸·Î, ´Ù¸¥ ÇÑ ´ë´Â º¹¿ø Àü¿ëÀ¸·Î »ç¿ëÇÏ°íÀÚ ÇÏ´Â °æ¿ìµµ ÀÖÀ» °ÍÀÌ´Ù. ÀÌÁ¦ ¹é¾÷ Àü¿ë ¼­¹ö¿¡¼­ ¹é¾÷ÇÑ °ÍÀ» º¹¿ø Àü¿ë ¼­¹ö¿¡¼­ ¹é¾÷ÇÏ´Â °æ¿ì¸¦ »ìÆ캸ÀÚ.

¹é¾÷ Àü¿ë ¼­¹öÀÇ È£½ºÆ®³×ÀÓÀº backupsvr¶ó ÇÏ°í, º¹¿ø Àü¿ë ¼­¹öÀÇ È£½ºÆ® ³×ÀÓÀº restoresvrÀ̶ó ÇÏÀÚ. ±×¸®°í /SpaceWar2/Schedule À» /tmp¿¡ º¹¿øÇÑ´Ù°í °¡Á¤ÇÏÀÚ.

	# cd /tmp
	# amrecover SpaceWar -s backupsvr -d /dev/nst0
      
-s ¿É¼ÇÀ¸·Î backupsvrÀ» index server·Î ÁöÁ¤ÇÏ¿´´Ù. /SpaceWar2/ScheduleÀÇ ¹é¾÷¿¡ ´ëÇÑ index´Â backupsvr¿¡ Àֱ⠶§¹®ÀÌ´Ù. ±× µÚÀÇ °úÁ¤Àº ¾Õ¼­ÀÇ º¹¿ø °úÁ¤°ú µ¿ÀÏÇÏ´Ù.

ÀÌ°ÍÀ¸·Î º¹¿ø¿¡ ´ëÇÑ °Íµµ ´ë·« ¾Ë¾Æ º¸¾Ò´Ù. ´õ ÀÚ¼¼ÇÑ °ÍÀº Amanda man page¸¦ Âü°íÇϸ鼭 ±×¸®°í ½ÇÁ¦·Î »ç¿ëÇϸ鼭 Çϳª¾¿ ÀÍÈ÷´Â °ÍÀÌ ÃÖ¼±ÀÇ ¹æ¹ýÀÎ µí ½Í´Ù.


8.6. ÁõºÐ ¹é¾÷

dump¶ó´Â ¹é¾÷ ÇÁ·Î±×·¥Àº 0¿¡¼­ 9±îÁöÀÇ ¹é¾÷ ·¹º§À» Áö¿øÇÑ´Ù. Amanda°¡ ³»ºÎÀûÀ¸·Î »ç¿ëÇÏ´Â ¹é¾÷ ÇÁ·Î±×·¥Àº dump ¶Ç´Â tarÀÌ´Ù. Amandaµµ 0¿¡¼­ 9±îÁöÀÇ ¹é¾÷ ·¹º§À» Á¦°øÇÏ¸ç ¹é¾÷ ·¹º§Àº »ç¿ëÀÚÀÇ ¼³Á¤À» ±Ù°Å·Î Amanda°¡ ½º½º·Î °áÁ¤ÇÑ´Ù.

¹é¾÷ ·¹º§ 0Àº Àüü¹é¾÷À» ÀǹÌÇÏ¸ç ¹é¾÷ ·¹º§ 1Àº Àüü ¹é¾÷ ÀÌÈÄ º¯°æµÈ ³»¿ë¿¡ ´ëÇÑ ¹é¾÷À» ¶æÇÑ´Ù. ¹é¾÷ ·¹º§ 2´Â ¹é¾÷ ·¹º§ 1 ÀÌÈÄ º¯°æµÈ ³»¿ë¿¡ ´ëÇÑ ¹é¾÷ÀÌ´Ù. ³ª¸ÓÁö ¹é¾÷ ·¹º§µµ ºñ½ÁÇÏ°Ô »ý°¢ÇÏ¸é µÉ °ÍÀÌ´Ù.

ÇÊÀÚ´Â ÇÑ ´Þ¿¡ 1ȸ Àüü ¹é¾÷À» ÇÏ°í ÁÖ°£ ´ÜÀ§·Î ·¹º§ 1ÀÇ ¹é¾÷À» ½Ç½ÃÇÑ´Ù. 9¿ù ù° ÀÏ¿äÀÏ¿¡ Àüü ¹é¾÷À» ½Ç½ÃÇß´Ù¸é µÑ° ÀÏ¿äÀÏ¿¡ ¹é¾÷ÇÒ ³»¿ëÀº Àüü ¹é¾÷ ÀÌÈÄ º¯°æ, Ãß°¡µÈ ÆÄÀϵéÀÏ °ÍÀÌ´Ù. ¼¼¹ø° ÀÏ¿äÀÏ¿¡ ¹é¾÷ÇÒ ³»¿ëµµ ·¹º§ 1ÀÇ ¹é¾÷À̹ǷΠÀüü ¹é¾÷ ÀÌÈÄ º¯°æ, Ãß°¡µÈ ÆÄÀϵéÀÏ °ÍÀÌ´Ù. µû¶ó¼­ ¼¼¹ø° ÀÏ¿äÀÏ¿¡ ÁõºÐ ¹é¾÷À» ÇÏ°ÔµÇ¸é µÎ¹ø° ÀÏ¿äÀÏ¿¡ ÁõºÐ ¹é¾÷ÇÑ ³»¿ëÀº ÇÊ¿ä¾ø°Ô µÇ¸ç ±× ¶§ »ç¿ëÇÑ Å×ÀÙÀº ÀçÈ°¿ëÀÌ °¡´ÉÇÏ°Ô µÈ´Ù.

°­Á¦·Î ·¹º§ 1ÀÇ ¹é¾÷À» ½Ç½ÃÇϱâ À§Çؼ­´Â 8.2절¿¡¼­ Á¤ÀÇÇÑ dumptype Áß¿¡¼­ incr-only¸¦ »ç¿ëÇÏ¸é µÈ´Ù.

        localhost   /SpaceWar1/Program-Sources      incr-only
        localhost   /SpaceWar1/Graphic-Sources      incr-only
        gmfs2       /SpaceWar2/Prototype            incr-only
        gmfs2       /SpaceWar2/Schedule             incr-only
      

ÀÌÁ¦ amcheck ¸í·ÉÀ¸·Î ÀÌ»ó À¯¹«¸¦ È®ÀÎÇÑ ÈÄ, amdump ¸í·ÉÀ¸·Î ¹é¾÷À» ½ÇÇà½ÃÅ°¸é µÉ °ÍÀÌ´Ù.


8.7. Å×ÀÙ¿¡ ¹Ù·Î ¾²±â

Amanda´Â ¹é¾÷À» ÁøÇàÇÏ´Â Áß¿¡ ·ÎÄõð½ºÅ©(holdingdisk)ÀÇ °ø°£ÀÌ ºÎÁ·ÇÏ¸é °ø°£¿¡ ¿©À¯°¡ »ý±æ ¶§±îÁö ÀϺΠµð·ºÅ丮¿¡ ´ëÇÑ ¹é¾÷À» ÀϽà Áß´ÜÇÏ°í ÀÖ´Ù°¡, °ø°£¿¡ ¿©À¯°¡ »ý±â¸é ±×¶§ ´Ù½Ã ¹é¾÷À» ÁøÇàÇÑ´Ù. À̶§ ½Ã°£ÀÇ Áö¿¬À¸·Î ÀÎÇØ ¹é¾÷¿¡ °É¸®´Â ½Ã°£ÀÌ ´Ã¾î³ª°Ô µÈ´Ù. ÀÌ °æ¿ì´Â ÀϺΠµð·ºÅ丮¸¦ Å×ÀÙ¿¡ ¹Ù·Î ¾²´Â °ÍÀÌ À¯¸®ÇÒ ¼öµµ ÀÖ´Ù. writetotapeÀ̶ó´Â dumptypeÀ» Á¤ÀÇÇÏ°í Å×ÀÙ¿¡ ¹Ù·Î ¾²±â¸¦ ¿øÇÏ´Â µð·ºÅ丮ÀÇ dumptypeÀ» writetotapeÀ¸·Î ÁöÁ¤ÇÏ¸é µÉ °ÍÀÌ´Ù.

        define dumptype wtritetotape {
            global
            comment "write directly to tape"
            priority high
	    dumpcycle 0
	    holdingdisk no
        }
      
writetotapeÀÌ Àû¿ëµÈ disklist ÆÄÀÏÀÇ ¿¹´Â ¾Æ·¡¿Í °°´Ù.
        localhost   /SpaceWar1/Program-Sources      writetotape
        localhost   /SpaceWar1/Graphic-Sources      always-full
        gmfs2       /SpaceWar2/Prototype            always-full 
        gmfs2       /SpaceWar2/Schedule             always-full
      


8.8. ÇÊ¿ä¾ø´Â ÆÄÀÏÀ» ¹é¾÷¿¡¼­ Á¦¿ÜÇÏ·Á¸é

¹é¾÷ÇÒ ÇÊ¿ä°¡ ¾ø´Â ÆÄÀÏÀÌ ÀÖÀ» ¼öµµ ÀÖ´Ù. ÀÌ ¶§´Â dumptype¿¡ exclude ¶Ç´Â exclude list¸¦ ÁöÁ¤ÇÏ¿© ÇØ°áÇÒ ¼ö ÀÖ´Ù. exclude list¿¡ ´ëÇØ ¾Ë¾Æº¸ÀÚ. dumptypeÀº ¾Æ·¡¿Í °°Àº ¸ð¾çÀÌ µÉ °ÍÀÌ´Ù.

        define dumptype always-full {
            global
            comment "write directly to tape"
            priority high
            dumpcycle 0
	    exclude list "/etc/amanda/SpaceWar/exclude-files"
        }
      
exclude-filesÀÇ ³»¿ëÀº ´ÙÀ½°ú °°ÀÌ ÀÛ¼ºÇÒ ¼ö ÀÖ´Ù.
        AUTOEXEC.BAT
        NTDETECT.COM
        arcsetup.exe
        ntldr
        WINNT
        Documents and Settings
        System Volume Information
        arcldr.exe
        bootfont.bin
        RECYCLED
        Recycled
        *.SYS
	*.sys
	*.ini
      


9. Âü°íÀÚ·á

AMANDA ȨÆäÀÌÁö

http://www.amanda.org

Using Amanda

http://www.backupcentral.com/amanda.html

Amanda Users ¸ÞÀϸµ ¸®½ºÆ® ¸ðÀ½

http://marc.theaimsgroup.com/?l=amanda-users


10. ¼öÁ¤µÈ mtx-changer ½ºÅ©¸³Æ®

¾Æ·¡ÀÇ ½ºÅ©¸³Æ®´Â IBM 3581 autoloader¿¡ Àû¿ë ÇÒ ¼ö ÀÖµµ·Ï ¼öÁ¤µÈ °ÍÀÓÀ» ´Ù½Ã ÇÑ ¹ø ¹àÇôµÐ´Ù. ÀϺΠ¼öÁ¤ÇÒ ºÎºÐÀÌ ´õ ÀÖÀ¸³ª ÀÛµ¿¿¡ º° ÀÌ»óÀÌ ¾ø±æ·¡ ±×³É ³»¹ö·Á µÎ¾ú´Ù.

        #! /bin/sh
        ###############################################################################
        # AMANDA Tape Changer script for use with the MTX tape changer program
        # Version 1.0 - Tue Feb 20 13:59:39 CST 2001
        # 
        # Based on 'stc-changer' by Eric Berggren (eric@ee.pdx.edu)
        # Updated by Tim Skirvin (tskirvin@ks.uiuc.edu)
        # 
        # Given that there's no license...let's make this the Perl Artistic License.
        # Just make sure you give me and Eric credit if you modify this.  
        ###############################################################################
        
        ### USER CONFIGURATION
        # Name of the tape drive (takes place of "tapedev" option in amanda.conf)
        #  and default driver number in library (usu 0) that DRIVE_NAME points to
        
        DRIVE_NUM=0
        
        # Location of "STC" command and control device
        MTX_CMD="/usr/sbin/mtx";
        MTX_CONTROL="/dev/sg0";
        
        # Whether tape drive must eject tape before changer retrieves
        #  (ie, EXB-2x0). Usually okay if set while not necessary, bad if
        #  required but not set.
        DRIVE_MUST_EJECT=1
        
        # How long to check drive readiness (in seconds) after mounting (or
        #  ejecting) a volume (on some libraries, the motion or eject command may
        #  complete before the drive has the volume fully mounted and online,
        #  or ready for retrieval, resulting in "Drive not ready"/"Media not
        #  ready" errors). Do an "mt status" command every 5 seconds upto this
        #  time.
        DRIVE_READY_TIME_MAX=120
        
        #  tape "mt" command location...
        MT_CMD="/bin/mt-st"     # called via "MT_CMD -f DRIVE_NAME rewind" &
                                 #   "MT_CMD -f DRIVE_NAME offline" to eject
                                 # and "MT_CMD -f DRIVE_NAME status" to get ready info
        
        ##############################################################################
        #
        NumDrives=-1
        NumSlots=-1
        LastSlot=-1
        LoadedTape=-1
        
        #
        # Usage information
        #
        usage()
        {
            echo
            echo "Usage: $Progname <command> [arg...]"
            echo "  -info          reports capability and loaded tape"
            echo "  -slot <slot>   loads specified tape into drive"
            echo "        current  reports current mounted tape"
            echo "        next     loads logically next tape (loops to top)"
            echo "        prev     loads logically previous tape (loops to bot)"
            echo "        first    loads first tape"
            echo "        last     loads last tape"
            echo "        0..99    loads tape from specified slot#"
            echo "  -eject         uloads current mounted tape"
            echo "  -reset         resets changer (and drive); loads first tape"
            echo
            exit 5
        }
        
        #
        # Perform "stc" changer command (& handle the "fatal" errors)
        #  else, set 'CommandResStr' and 'CommandRawResStr' to the result string 
        #  and 'CommandResCode' to the exit code
        #
        dotapecmd()
        {
            cmd=$1
            arg=$2
        
            CommandResStr=`$MTX_CMD $MTX_CONTROL $cmd $arg 2>&1`
            CommandRawResStr=$CommandResStr
            CommandResCode=$?
        
            CommandResStr=`echo $CommandResStr | head -1 | sed 's/^[^:]*: //'`
            if [ $CommandResCode -gt 1 ]; then
                echo "0 $Progname: returned $CommandResStr"
                exit 2
            fi
        }
        
        #
        # Unload tape from drive (a drive command; "ejecttape" is a changer command
        #  to actually retrieve the tape). Needed by some changers (controlled by
        #  setting "DRIVE_MUST_EJECT")
        #
        ejectdrive()
        {
            # Tell drive to eject tape before changer retrieves; req'd by some
            #  drives (ie, EXB-2x0). Not needed by QDLT-4x00. Do a "rewind"
            #  command first, then "offline" to eject (instead of "rewoffl")
            #
            if [ "$DRIVE_MUST_EJECT" -ne 0 ]; then
                mtresstr=`$MT_CMD -f $DRIVE_NAME rewind 2>&1`
                mtrescode=$?
        
        
                if [ $mtrescode -ne 0 ]; then
                    if echo "$mtresstr" | egrep -sq 'no tape'; then
                        :;   # no tape mounted; assume okay...
                    else
                        # can't eject tape, bad; output: <tape#> reason
                        echo "0 $mtresstr"
                        exit 1
                    fi
                else
                    mtresstr=`$MT_CMD -f $DRIVE_NAME offline 2>&1`
                    mtrescode=$?
        
                    checkdrive 1
                fi
            fi
        }
        
        #
        # Check drive readiness after (un)mounting a volume (which may take a while
        #  after the volume change command completes)
        #
        checkdrive()
        {
            unmounting=$1
        
            if [ "$DRIVE_READY_TIME_MAX" -gt 0 ]; then
        
                # sleep time between checks
                pausetime=5
        
                # number of interations to check
                numchecks=`expr $DRIVE_READY_TIME_MAX / $pausetime`
                if [ "$numchecks" -eq 0 ]; then
                    numchecks=1
                fi
        
                # check until success, or out of attempts...
                while [ "$numchecks" -gt 0 ]; do
                    mtresstr=`$MT_CMD -f $DRIVE_NAME status 2>&1`
                    mtrescode=$?
        
                    if [ $mtrescode -eq 0 ]; then
                        # Success ?
                        return 0
                    else
                        # pause, before trying again....
                        if [ "$numchecks" -gt 1 ]; then
                            sleep $pausetime
        
                            # if unmounting a volume, check for 'mt' command
                            #  failure; (sleep first for additional comfort)
                            if [ "$unmounting" -ne 0 ]; then
                                return 0
                            fi
                        fi
                    fi
                    numchecks=`expr $numchecks - 1`
                done
        
                # failed; output: -1 reason
                echo "-1 drive won't report ready"
                exit 1
            fi
        }
        
        #
        # Get changer parameters
        #
        getchangerparms()
        {
            dotapecmd status
            if [ $CommandResCode -eq 0 ] && \
                echo "$CommandResStr" | egrep -sq '^Storage Changer'; then
        
                NumDrives=`echo $dspec | wc -l`
        	NumDrives=`echo "$CommandRawResStr" | \
        			grep 'Data Transfer Element' | wc -l`
                if [ "$NumDrives" -le "$DRIVE_NUM" ]; then
                    echo "$Program: Invalid drive # specified ($DRIVE_NUM > $NumDrives)"
                    exit 3
                fi
        			# grep 'Data Transfer Element $DRIVE_NUM' | \
        	LoadedTape=`echo "$CommandRawResStr" | \
        			grep 'Data Transfer Element' | \
        			grep 'Storage Element [0-9]' | \
        			awk '{ print $7 }'	`
                if [ -z "$LoadedTape" -o "$LoadedTape" = "e" ]; then
                    LoadedTape=-1
                fi
                NumSlots=`echo "$CommandRawResStr" | \
        		grep 'Storage Element [0-9]\{1,\}:' | \
        		grep -v 'Data Element' | \
        		wc -l | sed -e 's/ //g' `
                LastSlot=`expr $NumSlots - 1`
            else
                echo \
                  "$Progname: Can't get changer parameters; Result was $CommandResStr"
                exit 3
            fi
        }
            
        #
        # Display changer info
        #
        changerinfo()
        {
            getchangerparms
        
            # output status string: currenttape numslots randomaccess?
            echo "$LoadedTape $NumSlots 1"
            exit 0
        }
        
        #
        # Eject current mounted tape
        #
        ejecttape()
        {
            getchangerparms
            ct=$LoadedTape
        
            # If no tape reported mounted, assume success (could be bad if changer
            #  lost track of tape)
            #
            if [ $ct -lt 0 ]; then
                CommandResCode=0
            else
                ejectdrive
                dotapecmd unload
            fi
        
            if [ $CommandResCode -ne 0 ]; then
                # failed; output: <tape#> reason
                echo "$ct $CommandResStr"
                exit 1
            #else
                # success; output: <tape#> drive
                #echo "$ct $DRIVE_NAME"
                #exit 0
            fi
        }
        
        #
        # Move specified tape into drive (operation level)
        #
        doloadtape()
        {
            slot=$1
            if [ "$slot" -eq "$LoadedTape" ]; then
                return 0
            fi
            ejectdrive
            ejecttape
            dotapecmd load $slot
            sleep 25
            return $CommandResCode
        }
        
        #
        # Load next available tape into drive
        #
        loadnexttape()
        {
            curslot=$1
            direction=$2
        
            startslot=$curslot
            while true; do
                if doloadtape $curslot; then
                    return 0
                else
                    if echo $CommandResStr | egrep -sq 'Slot.*reported empty'; then
        
                        if [ "$direction" -lt 0 ]; then
                            curslot=`expr $curslot - 1`
                            if [ "$curslot" -lt 0 ]; then
                                curslot=$LastSlot
                            fi
                        else
                            curslot=`expr $curslot + 1`
                            if [ "$curslot" -gt "$LastSlot" ]; then
                                curslot=0
                            fi
                        fi
        
                        # Check if we're back to where we started...
                        if [ "$curslot" = "$startslot" ]; then
                            if [ "$direction" -lt 0 ]; then
                                CommandResStr="No previous volume available"
                            else
                                CommandResStr="No subsequent volume available"
                            fi
                            return 1
                        fi
                    else
                        return 1
                    fi
                fi
            done
        }
        
        #
        # Report loadtape() status
        #
        reportstatus()
        {
            if [ $CommandResCode -eq 0 ]; then
                # success; output currenttape drivename
                echo "$LoadedTape $DRIVE_NAME"
                exit 0
            else
                # failed (empty slot?); output currenttape reason
                echo "$LoadedTape $CommandResStr"
                exit 1
            fi
        }
        
        
        #
        # Move specified tape into drive (command level)
        #
        loadtape()
        {
            slot=$1
        
            getchangerparms
        
            case "$slot" in
                current)
                    if [ $LoadedTape -lt 0 ]; then
                        CommandResStr="Can't determine current tape; drive empty ?"
                        CommandResCode=1
                    fi
                    ;;
                prev)
                    if [ $LoadedTape -le 0 ]; then
                        loadnexttape $LastSlot -1
                    else
                        loadnexttape `expr $LoadedTape - 1` -1
                    fi
                    ;;
                next)
                    if [ $LoadedTape -ge $LastSlot -o $LoadedTape -lt 0 ]; then
                        loadnexttape 1 1
                    else
                        loadnexttape `expr $LoadedTape + 1` 1
                    fi
                    ;;
                first)
                    loadnexttape 1 1
                    ;;
                last)
                    loadnexttape $LastSlot -1
                    ;;
                [0-9]*)
                    doloadtape $slot
                    ;;
                *)
                    # error; no valid slot specified
                    echo "$Progname: No valid slot specified"
                    exit 1
                    ;;
            esac
        
            if [ $CommandResCode -eq 0 ]; then
                getchangerparms
                checkdrive
            fi
            reportstatus
        }
        
        #
        # Reset changer to known state
        #
        resetchanger()
        {
            ejectdrive
            dotapecmd reset
            if [ $CommandResCode -ne 0 ]; then
                # failed; output: failed? reason
                echo "-1 $CommandResStr"
                exit 2;
            else
                loadtape first
            fi
        }
        
        #############################################################################
        #
        # MAIN
        #
        Progname=`basename $0`
        
        if [ ! -x "$MTX_CMD" ]; then
            echo "-1 $Progname: cannot run STC command ($MTX_CMD)"
            exit 2
        fi
        if [ -n "$MTX_CONTROL" ]; then
            if echo "$MTX_CONTROL" | egrep -sq '^-f'; then
                :;
            else
                MTX_CONTROL="-f $MTX_CONTROL"
            fi
        fi
        if [ -n "$DRIVE_NUM" ]; then
            DRIVE_NUM=0
        fi
        
        if [ $# -ge 1 ]; then command=$1; else command="-usage"; fi
        
        case "$command" in
            -info)
                changerinfo
                ;;
            -slot)
                loadtape $2
                ;;
            -eject)
                ejecttape
                ;;
            -reset)
                resetchanger
                ;;
            *)
                usage
                ;;
        esac
        
        exit 0
      


ID
Password
Join
Put not your trust in money, but put your money in trust.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2003-08-10 11:52:29
Processing time 0.0038 sec