question:1177294812ãã
ddã§ãã¼ã¿ã丸ãã¨æ°ããHDDã«ã³ãã¼ãããã®ã§ããã以ä¸ã®ãããªå ´åãã©ããããã¨ã«çæããã°ããã§ããããï¼
ã»ç¾å¨ã®HDDã¯Web/Mailãµã¼ãã¨ãã¦ç¨¼åä¸
ã»ãªãã¹ããã¦ã³ã¿ã¤ã ã¯å°ãªãããã
ã»æ°HDDã«ã³ãã¼ãã¦ããæä¸ã«ãç¾å¨ã®HDDã«è¿½å ããããã¼ã¿ã«ã¤ãã¦ããªãã¹ãæ¾ããã
ã»æ°HDDã¯USBå¤ä»ãã§æ¥ç¶ããã(ãªãã¹ããµã¼ããåæ¢ããããªã)
ãã®ãããªå ´åã¯ãdd ããã rsync ã使ã£ãã»ããè¯ãã¨æãã¾ãããå¸æã®æ¡ä»¶ãæºããã«ã¯ dd ã¯ä¸åãã§ãã
rsync ã使ãã¨å¤æ´ããã£ããã¡ã¤ã«ã ãã³ãã¼ãããã¨ãã§ãã¾ããdd ã¯ãã¡ã¤ã«åä½ã§ã®å¦çãã§ããªããããä½æ¥ä¸ã«å¤æ´ããã£ããã¡ã¤ã«ã ãå¦çããã¨ãããããªè¸å½ã¯ã§ãã¾ããã
rsyncã使ãå ´åã¯ã以ä¸ã®æé ãåãã¨ãå¸æã®æ¡ä»¶ããã¹ã¦æºããã¾ãããã®æé ã¯ãµã¼ãã®HDDã交æããéã«ä½¿ãããåãããæé ã§ãã
1) usb çµç±ã§HDDããã¦ã³ãããã
ãã¨ãã° /mnt/usb 以ä¸ã«ãã¦ã³ããã¾ãã
2) ã¡ã¼ã«ãªã©ã®ãµã¼ãã¹ã¯ç¨¼åãããã¾ã¾ãrsync ã§ãã¡ã¤ã«ãusbã®HDDã«ã³ãã¼ãã
# rsync -a --exclude=/mnt/usb / /mnt/usb
ãã®ã³ãã³ãã§ã"/" 以ä¸ã®ãã¹ã¦ã®ãã¡ã¤ã«ã "/mnt/usb" 以ä¸ã«ã³ãã¼ãã¾ãããã ã /mnt/usb 以ä¸ã®ãã¡ã¤ã«ã¯ é¤å¤(exclude)ãã¾ãã
ãã¼ã¿ãå¤ãã¨çµæ§æéãæããã¾ããããµã¼ããã¨ããå¿ è¦ã¯ããã¾ããã
rsync ãã¤ã³ã¹ãã¼ã«ããã¦ããªãå ´åã¯
# apt-get install rsync
ãã¦ãã ããã
3) ãµã¼ãã¹ãä¸æ¦ã¨ãã
ãµã¼ãã®LANã±ã¼ãã«ãå¤ãã®ãä¸çªç°¡åã§ç¢ºå®ã§ããç¹ã«ãµã¼ãèªä½ãåèµ·åããå¿
è¦ã¯ããã¾ããã
4)ãå度 rsync ã§ãã¡ã¤ã«ãã³ãã¼ãã
# rsync -a --exclude=/mnt/usb --delete / /mnt/usb
ä¸è¨ã®2)ãã3)ã®ä½æ¥ä¸ã« æ¬ä½å´ã®HDDã«è¿½å ã»åé¤ã»å¤æ´ããããã¡ã¤ã«ã¯ã¾ã /mnt/usb 以ä¸ã«åæ ããã¦ãã¾ãããããã§ä¸è¨ã³ãã³ããå®è¡ãã¦ããããã®å¤æ´ã /mnt/usb 以ä¸ã«åæ ããã¾ãã
ããã§ã"--delete" ãªãã·ã§ã³ãä»ãããã¨ãéè¦ã§ãããã¨ãã°ã¦ã¼ã¶ã¼ãã¡ã¼ã«ãåä¿¡ããã¨ããã®ã¡ã¼ã«ã«ç¸å½ãããã¡ã¤ã«ã¯æ¬ä½å´ã®HDDããæ¶å»ããã¾ãã"--delete"ãä»ããã¨ããã®ãããªHDDå´ã§åé¤ããããã¡ã¤ã«ã /mnt/usb å´ã§æ¶ããã¨ãã§ãã¾ãã
5) ä½æ¥çµäº
LANã®ã±ã¼ãã«ãå度ç¹ãã¾ããä¸å®ãªç¹ãããã°ããµã¼ããåèµ·åããã»ãã確å®ã§ãããµã¼ãã¹ã®åä½ç¢ºèªãå¿ããã«ã
åèURL
- rsyncã®ããã¥ã¢ã«
- http://www.infoscience.co.jp/technical/rsync/rsync.html