{"id":140,"date":"2015-12-08T08:01:10","date_gmt":"2015-12-08T08:01:10","guid":{"rendered":"http:\/\/www.onepage.co.kr\/wordpress\/?p=140"},"modified":"2016-04-01T01:10:03","modified_gmt":"2016-03-31T16:10:03","slug":"mysqlwindows-scheduler-mysql-data-backup-deletion","status":"publish","type":"post","link":"https:\/\/www.onepage.co.kr\/wordpress\/index.php\/2015\/12\/08\/mysqlwindows-scheduler-mysql-data-backup-deletion\/","title":{"rendered":"[MySQL,windows] \uc791\uc5c5\uc2a4\ucf00\uc904\ub7ec\ub97c \uc774\uc6a9\ud55c MySQL\ubc31\uc5c5 \ubc0f \ub370\uc774\ud130 \uc0ad\uc81c"},"content":{"rendered":"<p><a data-topotext=\"[{&quot;attributes&quot;:{&quot;tombstoned&quot;:false,&quot;paragraphStyle&quot;:{&quot;style&quot;:3},&quot;uniqueId&quot;:5},&quot;codePoints&quot;:[10,10]},{&quot;attributes&quot;:{&quot;tombstoned&quot;:false,&quot;paragraphStyle&quot;:{&quot;style&quot;:3},&quot;fontHints&quot;:1,&quot;link&quot;:&quot;http:\/\/forum.falinux.com\/zbxe\/index.php?document_srl=565953&quot;,&quot;uniqueId&quot;:192},&quot;codePoints&quot;:[91,77,121,83,81,76,44,119,105,110,100,111,119,115,93]},{&quot;attributes&quot;:{&quot;tombstoned&quot;:false,&quot;paragraphStyle&quot;:{&quot;style&quot;:3},&quot;fontHints&quot;:1,&quot;uniqueId&quot;:7},&quot;codePoints&quot;:[32]},{&quot;attributes&quot;:{&quot;tombstoned&quot;:false,&quot;paragraphStyle&quot;:{&quot;style&quot;:3},&quot;fontHints&quot;:1,&quot;link&quot;:&quot;http:\/\/forum.falinux.com\/zbxe\/index.php?document_srl=565953&quot;,&quot;uniqueId&quot;:192},&quot;codePoints&quot;:[51089,50629,49828,52992,51460,47084,47484,32,51060,50857,54620,32,77,121,83,81,76,48177,50629,32,48143,32,45936,51060,53552,32,49325,51228]},{&quot;attributes&quot;:{&quot;tombstoned&quot;:false,&quot;paragraphStyle&quot;:{&quot;style&quot;:3},&quot;uniqueId&quot;:5},&quot;codePoints&quot;:[10,10,10,49,46,77,121,83,81,76,51032,32,45936,51060,53552,48288,51060,49828,47484,32,47588,50900,32,52395,48264,51704,32,51068,50836,51068,32,50724,51204,32,48,48,58,48,49,48516,50640,32,48177,50629,54616,45716,32,50696,51228,10,10,160,32,49,45,49,46,32,49828,52992,51460,47084,32,46321,47197,32,52964,47704,46300,32,10,83,67,72,84,65,83,75,83,32,47,67,114,101,97,116,101,32,47,83,67,32,77,79,78,84,72,76,89,32,47,77,79,32,102,105,114,115,116,32,47,68,32,83,85,78,32,47,83,84,32,48,48,58,48,49,32,47,84,78,32,77,121,83,81,76,95,66,97,99,107,85,112,32,47,84,82,32,68,58,92,100,98,95,98,97,107,117,112,92,98,97,107,117,112,46,98,97,116,10,10,160,91,54400,51060,93,10,10,160,32,47,67,114,101,97,116,101,32,58,32,49828,52992,51460,47084,32,49888,44508,10,10,160,32,47,83,67,32,77,79,78,84,72,76,89,32,58,32,47588,50900,10,10,160,32,47,77,79,32,102,105,115,116,32,58,32,52395,48264,51704,10,10,160,32,47,68,32,83,85,78,32,58,32,51068,50836,51068,10,10,160,160,47,83,84,32,48,48,58,48,49,32,58,32,49828,53440,53944,32,49884,44036,51008,32,50724,51204,48,48,58,48,49,48516,10,10,160,32,47,84,78,32,77,121,83,81,76,95,66,97,99,107,85,112,32,58,32,49828,52992,51460,47084,32,51060,47492,10,10,160,32,47,84,82,32,68,58,92,100,98,95,98,97,107,117,112,92,98,97,107,117,112,46,98,97,116,32,58,32,49892,54665,54624,32,54532,47196,44536,47016,51032,32,44221,47196,32,48143,32,54028,51068,32,51060,47492,10,10,160,160,10,10,160,32,49,45,50,46,98,97,107,117,112,46,98,97,116,32,48176,52824,54028,51068,32,45236,50857,10,64,101,99,104,111,32,111,102,102,10,101,99,104,111,32,83,116,97,114,116,32,66,97,107,117,112,46,46,46,10,109,121,115,113,108,100,117,109,112,32,45,117,49324,50857,51088,47749,32,45,112,48708,48128,48264,54840,32,45,45,114,101,115,117,108,116,45,102,105,108,101,61,34,68,58,92,100,98,95,98,97,107,117,112,92,98,97,99,107,117,112,46,37,100,97,116,101,37,46,115,113,108,34,32,45936,51060,53552,48288,51060,49828,47749,10,101,99,104,111,32,69,110,100,32,66,97,107,117,112,46,46,46,10,10,32,10,10,32,10,10,32,10,10,50,46,50948,50640,49436,32,48177,50629,51012,32,54620,54980,32,54788,49884,51216,51004,47196,54644,49436,32,49,44060,50900,32,51060,51204,51032,32,45936,51060,53552,47484,32,47588,50900,32,52395,48264,51704,32,51068,50836,51068,32,50724,51204,32,48,48,58,49,48,48516,50640,32,51648,50864,44592,160,50696,51228,10,10,160,32,50,45,49,46,32,49828,52992,51460,47084,32,46321,47197,32,52964,47704,46300,10,83,67,72,84,65,83,75,83,32,47,67,114,101,97,116,101,32,47,83,67,32,77,79,78,84,72,76,89,32,47,77,79,32,102,105,114,115,116,32,47,68,32,83,85,78,32,47,83,84,32,48,48,58,49,48,32,47,84,78,32,77,121,83,81,76,95,68,101,108,101,116,101,32,47,84,82,32,68,58,92,100,98,95,98,97,107,117,112,92,100,97,116,97,95,100,101,108,46,98,97,116,10,10,91,54400,51060,93,10,10,49,46,48264,44284,32,46041,51068,10,10,32,10,10,32,10,10,160,32,50,45,50,46,32,100,97,116,97,95,100,101,108,46,98,97,116,32,48176,52824,54028,51068,32,45236,50857,10,109,121,115,113,108,32,45,117,50976,51200,73,68,32,45,112,50976,51200,54056,49828,50892,46300,32,45936,51060,53552,48288,51060,49828,47749,32,45,101,32,34,100,101,108,101,116,101,32,102,114,111,109,32,53580,51060,48660,47749,32,119,104,101,114,101,32,45216,51676,52972,47100,32,60,61,32,100,97,116,101,95,115,117,98,40,99,117,114,100,97,116,101,40,41,44,32,73,78,84,69,82,86,65,76,32,49,32,77,79,78,84,72,41,59,34,10,10,160,91,54400,51060,93,10,10,45,101,32,34,100,101,108,101,116,101,32,102,114,111,109,32,53580,51060,48660,47749,32,119,104,101,114,101,32,45216,51676,52972,47100,32,60,61,32,100,97,116,101,95,115,117,98,40,99,117,114,100,97,116,101,40,41,44,32,73,78,84,69,82,86,65,76,32,49,32,77,79,78,84,72,41,59,34,32,10,58,32,49892,54665,32,49884,53420,32,52964,47592,46300,10,10,32]}]\">\u200b<\/a><\/p>\n<div><\/div>\n<div><\/div>\n<div>[MySQL,windows] \uc791\uc5c5\uc2a4\ucf00\uc904\ub7ec\ub97c \uc774\uc6a9\ud55c MySQL\ubc31\uc5c5 \ubc0f \ub370\uc774\ud130 \uc0ad\uc81c<\/div>\n<div><\/div>\n<div><\/div>\n<div>1.MySQL\uc758 \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ub9e4\uc6d4 \uccab\ubc88\uc9f8 \uc77c\uc694\uc77c \uc624\uc804 00:01\ubd84\uc5d0 \ubc31\uc5c5\ud558\ub294 \uc608\uc81c<\/div>\n<div><\/div>\n<div>\u00a0 1-1. \uc2a4\ucf00\uc904\ub7ec \ub4f1\ub85d \ucee4\uba58\ub4dc<\/div>\n<div>SCHTASKS \/Create \/SC MONTHLY \/MO first \/D SUN \/ST 00:01 \/TN MySQL_BackUp \/TR D:\\db_bakup\\bakup.bat<\/div>\n<div><\/div>\n<div>\u00a0[\ud480\uc774]<\/div>\n<div><\/div>\n<div>\u00a0 \/Create : \uc2a4\ucf00\uc904\ub7ec \uc2e0\uaddc<\/div>\n<div><\/div>\n<div>\u00a0 \/SC MONTHLY : \ub9e4\uc6d4<\/div>\n<div><\/div>\n<div>\u00a0 \/MO fist : \uccab\ubc88\uc9f8<\/div>\n<div><\/div>\n<div>\u00a0 \/D SUN : \uc77c\uc694\uc77c<\/div>\n<div><\/div>\n<div>\u00a0\u00a0\/ST 00:01 : \uc2a4\ud0c0\ud2b8 \uc2dc\uac04\uc740 \uc624\uc80400:01\ubd84<\/div>\n<div><\/div>\n<div>\u00a0 \/TN MySQL_BackUp : \uc2a4\ucf00\uc904\ub7ec \uc774\ub984<\/div>\n<div><\/div>\n<div>\u00a0 \/TR D:\\db_bakup\\bakup.bat : \uc2e4\ud589\ud560 \ud504\ub85c\uadf8\ub7a8\uc758 \uacbd\ub85c \ubc0f \ud30c\uc77c \uc774\ub984<\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div>\u00a0 1-2.bakup.bat \ubc30\uce58\ud30c\uc77c \ub0b4\uc6a9<\/div>\n<div>@echo off<\/div>\n<div>echo Start Bakup&#8230;<\/div>\n<div>mysqldump -u\uc0ac\uc6a9\uc790\uba85 -p\ube44\ubc00\ubc88\ud638 &#8211;result-file=&#8221;D:\\db_bakup\\backup.%date%.sql&#8221; \ub370\uc774\ud130\ubca0\uc774\uc2a4\uba85<\/div>\n<div>echo End Bakup&#8230;<\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div>2.\uc704\uc5d0\uc11c \ubc31\uc5c5\uc744 \ud55c\ud6c4 \ud604\uc2dc\uc810\uc73c\ub85c\ud574\uc11c 1\uac1c\uc6d4 \uc774\uc804\uc758 \ub370\uc774\ud130\ub97c \ub9e4\uc6d4 \uccab\ubc88\uc9f8 \uc77c\uc694\uc77c \uc624\uc804 00:10\ubd84\uc5d0 \uc9c0\uc6b0\uae30\u00a0\uc608\uc81c<\/div>\n<div><\/div>\n<div>\u00a0 2-1. \uc2a4\ucf00\uc904\ub7ec \ub4f1\ub85d \ucee4\uba58\ub4dc<\/div>\n<div>SCHTASKS \/Create \/SC MONTHLY \/MO first \/D SUN \/ST 00:10 \/TN MySQL_Delete \/TR D:\\db_bakup\\data_del.bat<\/div>\n<div><\/div>\n<div>[\ud480\uc774]<\/div>\n<div><\/div>\n<div>1.\ubc88\uacfc \ub3d9\uc77c<\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div><\/div>\n<div>\u00a0 2-2. data_del.bat \ubc30\uce58\ud30c\uc77c \ub0b4\uc6a9<\/div>\n<div>mysql -u\uc720\uc800ID -p\uc720\uc800\ud328\uc2a4\uc6cc\ub4dc \ub370\uc774\ud130\ubca0\uc774\uc2a4\uba85 -e &#8220;delete from \ud14c\uc774\ube14\uba85 where \ub0a0\uc9dc\uceec\ub7fc &lt;= date_sub(curdate(), INTERVAL 1 MONTH);&#8221;<\/div>\n<div><\/div>\n<div>\u00a0[\ud480\uc774]<\/div>\n<div><\/div>\n<div>-e &#8220;delete from \ud14c\uc774\ube14\uba85 where \ub0a0\uc9dc\uceec\ub7fc &lt;= date_sub(curdate(), INTERVAL 1 MONTH);&#8221;<\/div>\n<div>: \uc2e4\ud589 \uc2dc\ud0ac \ucee4\ub9e8\ub4dc<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u200b [MySQL,windows] \uc791\uc5c5\uc2a4\ucf00\uc904\ub7ec\ub97c \uc774\uc6a9\ud55c MySQL\ubc31\uc5c5 \ubc0f \ub370\uc774\ud130 \uc0ad\uc81c 1.MySQL\uc758 \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ub9e4\uc6d4 \uccab\ubc88\uc9f8 \uc77c\uc694\uc77c \uc624\uc804 00:01\ubd84\uc5d0 \ubc31\uc5c5\ud558\ub294 \uc608\uc81c \u00a0 1-1. \uc2a4\ucf00\uc904\ub7ec \ub4f1\ub85d \ucee4\uba58\ub4dc SCHTASKS \/Create \/SC MONTHLY \/MO first \/D SUN \/ST 00:01 \/TN MySQL_BackUp \/TR D:\\db_bakup\\bakup.bat \u00a0[\ud480\uc774] \u00a0 \/Create : \uc2a4\ucf00\uc904\ub7ec \uc2e0\uaddc \u00a0 \/SC MONTHLY : \ub9e4\uc6d4 \u00a0 \/MO fist : \uccab\ubc88\uc9f8 \u00a0 \/D SUN [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-140","post","type-post","status-publish","format-standard","hentry","category-mariadb-mysql"],"_links":{"self":[{"href":"https:\/\/www.onepage.co.kr\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.onepage.co.kr\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.onepage.co.kr\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.onepage.co.kr\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.onepage.co.kr\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=140"}],"version-history":[{"count":1,"href":"https:\/\/www.onepage.co.kr\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/140\/revisions"}],"predecessor-version":[{"id":141,"href":"https:\/\/www.onepage.co.kr\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/140\/revisions\/141"}],"wp:attachment":[{"href":"https:\/\/www.onepage.co.kr\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.onepage.co.kr\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.onepage.co.kr\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}