{"id":461,"date":"2021-11-17T16:58:50","date_gmt":"2021-11-17T07:58:50","guid":{"rendered":"https:\/\/centos.ihavenomoney.co.kr\/?page_id=461"},"modified":"2021-11-17T17:31:19","modified_gmt":"2021-11-17T08:31:19","slug":"mysql-%eb%94%94%eb%b9%84-%eb%b0%b1%ec%97%85-%eb%b0%8f-%eb%b3%b5%ec%9b%90","status":"publish","type":"page","link":"https:\/\/centos.ihavenomoney.co.kr\/?page_id=461","title":{"rendered":"MySQL \ub514\ube44 \ubc31\uc5c5 \ubc0f \ubcf5\uc6d0"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">\ubc31\uc5c5 : root \uad8c\ud55c\uc73c\ub85c \ubc31\uc5c5<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \">mysqldump -u root -p developer &gt; developer_01.sql<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\ubcf5\uc6d0 : root \uad8c\ud55c\uc73c\ub85c \ubcf5\uc6d0<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \">mysql -u root -p developer &lt; developer_01.sql<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\uc2a4\ucf00\uc974 \uac78\uae30 :  sql.sh \ud30c\uc77c\uc744 \ub9cc\ub4e4\uc5b4 crontab \uc5d0 \uc138\ud305<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" title=\"sql.sh\">#!\/bin\/bash\nd=$(\/bin\/date +\"%Y%m%d\")\n\/usr\/local\/mysql\/bin\/mysqldump -uroot -p\ud328\uc2a4\uc6cc\ub4dc \ub514\ube44\uba85 &gt; \/backup-sql\/\ub514\ube44\ubc31\uc5c5\ud30c\uc77c\uba85.sql\ncp -Ruf \/usr\/local\/mysql\/data\/db_young \/backup-sql\/\ntar cvfpz \/backup-sql\/$d.young_sql.tar.gz \/backup-sql\/*\nmv \/backup-sql\/$d.young_sql.tar.gz \/backup-full\/<\/pre><\/div>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" title=\"crontab\">crontab -e\n \n3 2 * * * \/sql.sh<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\ub4f1\ub85d \ub0b4\uc6a9 \uc124\uc815<\/h3>\n\n\n\n<p>\ubd84,\uc2dc,\uc77c,\uc6d4,\uc694\uc77c, \uc2e4\ud589\uba85\ub839 \uc21c\uc73c\ub85c \uc124\uc815<\/p>\n\n\n\n<p>crontab \ud30c\uc77c \ud615\uc2dd<br>\u2014\u2014 \u2014\u2014\u2013 \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>\ud544 \ub4dc \uc758 \ubbf8 \ubc94 \uc704<br>\u2014\u2014 \u2014\u2014\u2013 \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br>\uccab\ubc88\uc9f8 \ubd84 0-59<br>\ub450\ubc88\uc9f8 \uc2dc 0-23<br>\uc138\ubc88\uc9f8 \uc77c 0-31<br>\ub124\ubc88\uc9f8 \uc6d4 1-12<br>\ub2e4\uc12f\ubc88\uc9f8 \uc694\uc77c 0-7 (0 \ub610\ub294 7=\uc77c\uc694\uc77c, 1=\uc6d4, 2=\ud654,\u2026)<br>\uc5ec\uc12f\ubc88\uc9f8 \uba85\ub839\uc5b4 \uc2e4\ud589\ud560 \uba85\ub839\uc744 \ud55c\uc904\ub85c \uc4f4\ub2e4.<br>\u2014\u2014 \u2014\u2014\u2013 \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ubc31\uc5c5 : root \uad8c\ud55c\uc73c\ub85c \ubc31\uc5c5 \ubcf5\uc6d0 : root \uad8c\ud55c\uc73c\ub85c \ubcf5\uc6d0 \uc2a4\ucf00\uc974 \uac78\uae30 : sql.sh \ud30c\uc77c\uc744 \ub9cc\ub4e4\uc5b4 crontab \uc5d0 \uc138\ud305 \ub4f1\ub85d \ub0b4\uc6a9 \uc124\uc815 \ubd84,\uc2dc,\uc77c,\uc6d4,\uc694\uc77c, \uc2e4\ud589\uba85\ub839 \uc21c\uc73c\ub85c \uc124\uc815 crontab \ud30c\uc77c \ud615\uc2dd\u2014\u2014 \u2014\u2014\u2013 \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\ud544 \ub4dc \uc758 \ubbf8 \ubc94 \uc704\u2014\u2014 \u2014\u2014\u2013 \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\uccab\ubc88\uc9f8 \ubd84 0-59\ub450\ubc88\uc9f8 \uc2dc 0-23\uc138\ubc88\uc9f8 \uc77c 0-31\ub124\ubc88\uc9f8 \uc6d4 1-12\ub2e4\uc12f\ubc88\uc9f8 \uc694\uc77c 0-7 (0 \ub610\ub294 7=\uc77c\uc694\uc77c, 1=\uc6d4, 2=\ud654,\u2026)\uc5ec\uc12f\ubc88\uc9f8 \uba85\ub839\uc5b4 \uc2e4\ud589\ud560 &hellip;<br \/><a href=\"https:\/\/centos.ihavenomoney.co.kr\/?page_id=461\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\"><span class=\"screen-reader-text\">MySQL \ub514\ube44 \ubc31\uc5c5 \ubc0f \ubcf5\uc6d0<\/span> \ub354\ubcf4\uae30<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-461","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=461"}],"version-history":[{"count":4,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/461\/revisions"}],"predecessor-version":[{"id":468,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/461\/revisions\/468"}],"wp:attachment":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}