{"id":119,"date":"2018-06-29T09:33:57","date_gmt":"2018-06-29T00:33:57","guid":{"rendered":"https:\/\/www.chohi.ga\/?p=119"},"modified":"2018-07-03T05:37:32","modified_gmt":"2018-07-02T20:37:32","slug":"%eb%b0%b1%ec%97%85%ed%99%98%ea%b2%bd-%ea%b5%ac%ec%b6%95","status":"publish","type":"post","link":"https:\/\/www.kkoc.org\/?p=119","title":{"rendered":"\ubc31\uc5c5\ud658\uacbd \uad6c\ucd95"},"content":{"rendered":"<p>\ubc31\uc5c5\ud658\uacbd\uc5d0 \ub300\ud55c \uc124\uba85\uc5c6\uc774 \uc2a4\ud06c\ub9bd\ud2b8\ub9cc \ub123\uc740\uac83 \uac19\uc544\uc11c \uba87\uc790 \uc801\uc5b4\ubd05\ub2c8\ub2e4.<\/p>\n<p>\uc800\ud76c\uc9d1\uc5d0\ub294 \uc544\ub798\uc758 \uadf8\ub9bc\ucc98\ub7fc \uac00\uc0c1\ud654 \uc11c\ubc84(vmware)\uc5d0 Xpenology, CentOS, Ubuntu \uc11c\ubc84\uac00 \uc124\uce58\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc6f9\uc11c\ubc84 \ucee8\ud150\uce20 \ubc0f \uc11c\ubc84\uc124\uc815\uc815\ubcf4, DB\uc11c\ubc84\uc5d0 \ub300\ud574\uc11c Cold\ubc31\uc5c5 \ubc1b\uc544\uc11c \ud5e4\ub180\ub85c\uc9c0\uc758 \ud30c\uc77c\uc2dc\uc2a4\ud15c\uc73c\ub85c \ubcf4\uad00\ud558\uac8c \uad6c\uc131\ud558\uc600\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ub3d9\uc77c \uc11c\ubc84\ub0b4\uc5d0 \uc788\uc5b4\uc11c \ub124\ud2b8\uc6cc\ud06c \uc18d\ub3c4\uac00 \ube60\ub974\uace0\uc694, Samba\ub294 \uc11c\ubc84\ub4e4\uac04\uc758 \ud30c\uc77c\uacf5\uc720\uac00 \uc27d\ub2e4\ub294 \uc774\uc810\uc774 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc544\ub798\uc758 \uad6c\uc870\ub294 \u00a0\uba87\ub144\uc804 \u00a0\ubaa8 \uc5f0\uad6c\uae30\uad00\uc5d0\uc11c\ub3c4 \uc0ac\uc6a9\ud588\ub358 \uc2dc\uc2a4\ud15c \uad6c\uc870\uc785\ub2c8\ub2e4.<\/p>\n<p>\uadf8\ub8f9\uc6e8\uc5b4, ERP, \ud1b5\ud569\ubb38\uc11c\uad00\ub9ac, \ud2b9\ud5c8, \uae30\uc220\uc774\uc804, \uacf5\ub3d9\/\uc704\ud0c1 \ub4f1 \uc2dc\uc2a4\ud15c\uac04 \ud30c\uc77c\uc744 \uacf5\uc720\ud558\uae30 \uc704\ud574\uc11c \u00a0NAS\uc758 Samba \uacf5\uc720\ud3f4\ub354\ub97c \uc0ac\uc6a9\ud588\uc5c8\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ubcf4\uc548\uc5d0\ub294 \ucde8\uc57d\ud558\ub098 \uc800\ud76c\uc9d1 \ubc31\uc5c5\ud658\uacbd\uc73c\ub85c \uc0ac\uc6a9\ud574 \ubd24\uc2b5\ub2c8\ub2e4.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-139\" src=\"https:\/\/www.chohi.ga\/wp-content\/uploads\/2018\/06\/\ubc31\uc5c5\ud658\uacbd.jpg\" alt=\"\" width=\"511\" height=\"372\" srcset=\"https:\/\/www.kkoc.org\/wp-content\/uploads\/2018\/06\/\ubc31\uc5c5\ud658\uacbd.jpg 511w, https:\/\/www.kkoc.org\/wp-content\/uploads\/2018\/06\/\ubc31\uc5c5\ud658\uacbd-300x218.jpg 300w\" sizes=\"(max-width: 511px) 100vw, 511px\" \/><\/p>\n<h1>samba \ud074\ub77c\uc774\uc5b8\ud2b8 \uc124\uce58<\/h1>\n<pre>\u3147 CenOS7\r\n#yum install -y samba-client.x86_64\r\n#yum install -y cifs-utils.x86_64\r\n\r\n\u3147 Ubuntu\r\n#sudo apt-get install samba-client\r\n#sudo apt-get install cifs-utils<\/pre>\n<h1>\uacf5\uc720 \ud3f4\ub354 \ud655\uc778<\/h1>\n<pre>#smbclient -L &lt;Server IP&gt; -U &lt;\uc0ac\uc6a9\uc790ID&gt;<\/pre>\n<h1>samba \ub514\ub809\ud1a0\ub9ac mount<\/h1>\n<pre>#mkdir \/backup\r\n#sudo mount -t cifs \\\\\\\\&lt;Server IP&gt;\\\\\ud3f4\ub354 \/backup -o user=&lt;User ID&gt;,vers=2.0,uid=1000<\/pre>\n<h1>\ubc31\uc5c5 script<\/h1>\n<pre>#!\/bin\/bash\r\n#\ud2b9\uc815\ud3f4\ub354 \ubc31\uc5c5\r\ntar -czpf \/backup\/&lt;\ubc31\uc5c5\ud30c\uc77c\uba85&gt;.`date +%Y%m%d%H%M%S`.tgz \/home\/&lt;\ubc31\uc5c5\ud3f4\ub354&gt; 1&gt;\/dev\/null 2&gt;\/dev\/null\r\n\r\n#mysql\ubc31\uc5c5\r\nmysqldump -u&lt;\uc0ac\uc6a9\uc790ID&gt; -p&lt;\ud328\uc2a4\uc6cc\ub4dc&gt; --all-databases &gt; \/backup\/\ud30c\uc77c\uba85.`date +%Y%m%d%H%M%S`.sql\r\n\r\n#\uc624\ub798\ub41c \ubc31\uc5c5\ud30c\uc77c \uc0ad\uc81c(30\uc77c\uc774\uc804)\r\nfind \/backup\/ -type f -mtime +30 | sort | xargs rm -f<\/pre>\n<h1>cron \uc124\uc815<\/h1>\n<pre>#\ub9e4\uc77c \uc0c8\ubcbd0\uc2dc 0\ubd84\uc5d0 \uc218\ud589 \r\n0 0 * * * \/home\/chohi\/backup.sh<\/pre>\n<h1>\uc790\ub3d9\uc2e4\ud589<\/h1>\n<pre>##CentOS 7\r\n#\/etc\/rc.local \ud30c\uc77c\uc5d0 \ucd94\uac00\r\nmount -t cifs \\\\\\\\&lt;Server IP&gt;\\\\\ud3f4\ub354 \/backup -o user=&lt;\uc0ac\uc6a9\uc790ID&gt;,password=&lt;\ud328\uc2a4\uc6cc\ub4dc&gt;,vers=2.0,uid=1000<\/pre>\n<pre>##Ubuntu \r\n#!\/bin\/sh\r\n\r\ncase $1 in\r\n\r\nstart)\r\nmount -t cifs \\\\\\\\&lt;Server IP&gt;\\\\\ud3f4\ub354 \/backup -o user=&lt;\uc0ac\uc6a9\uc790ID&gt;,password=&lt;\ud328\uc2a4\uc6cc\ub4dc&gt;,vers=2.0,uid=1000 ;;\r\nstop)\r\numount \/backup ;;\r\n\r\nrestart)\r\numount \/backup\r\nmount -t cifs \\\\\\\\&lt;Server IP&gt;\\\\\ud3f4\ub354 \/backup -o user=&lt;\uc0ac\uc6a9\uc790ID&gt;,password=&lt;\ud328\uc2a4\uc6cc\ub4dc&gt;,vers=2.0,uid=1000 ;;\r\n\r\nesac\r\n\r\nexit 0<\/pre>\n<pre>##\/etc\/init.d\/xxx.sh \uc2a4\ud06c\ub9bd\ud2b8 \ucd94\uac00\ud6c4 755 \ud37c\ubbf8\uc158\uc744 \uc900\ub2e4.\r\n\r\n\r\n##rc.d\uc5d0 \uc2e4\ud589 \uc2a4\ud06c\ub9bd\ud2b8\ucd94\uac00\r\n#sudo update-rc.d xxx.sh defaults<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\ubc31\uc5c5\ud658\uacbd\uc5d0 \ub300\ud55c \uc124\uba85\uc5c6\uc774 \uc2a4\ud06c\ub9bd\ud2b8\ub9cc \ub123\uc740\uac83 \uac19\uc544\uc11c \uba87\uc790 \uc801\uc5b4\ubd05\ub2c8\ub2e4. \uc800\ud76c\uc9d1\uc5d0\ub294 \uc544\ub798\uc758 \uadf8\ub9bc\ucc98\ub7fc \uac00\uc0c1\ud654 \uc11c\ubc84(vmware)\uc5d0 Xpenology, CentOS, Ubuntu \uc11c\ubc84\uac00 \uc124\uce58\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. \uc6f9\uc11c\ubc84 \ucee8\ud150\uce20 \ubc0f \uc11c\ubc84\uc124\uc815\uc815\ubcf4, DB\uc11c\ubc84\uc5d0 \ub300\ud574\uc11c Cold\ubc31\uc5c5 \ubc1b\uc544\uc11c \ud5e4\ub180\ub85c\uc9c0\uc758 \ud30c\uc77c\uc2dc\uc2a4\ud15c\uc73c\ub85c \ubcf4\uad00\ud558\uac8c \uad6c\uc131\ud558\uc600\uc2b5\ub2c8\ub2e4. \ub3d9\uc77c \uc11c\ubc84\ub0b4\uc5d0 \uc788\uc5b4\uc11c \ub124\ud2b8\uc6cc\ud06c \uc18d\ub3c4\uac00 \ube60\ub974\uace0\uc694, Samba\ub294&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/www.kkoc.org\/index.php?rest_route=\/wp\/v2\/posts\/119"}],"collection":[{"href":"https:\/\/www.kkoc.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kkoc.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kkoc.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kkoc.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=119"}],"version-history":[{"count":12,"href":"https:\/\/www.kkoc.org\/index.php?rest_route=\/wp\/v2\/posts\/119\/revisions"}],"predecessor-version":[{"id":141,"href":"https:\/\/www.kkoc.org\/index.php?rest_route=\/wp\/v2\/posts\/119\/revisions\/141"}],"wp:attachment":[{"href":"https:\/\/www.kkoc.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kkoc.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kkoc.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}