{"id":419,"date":"2015-08-31T09:53:40","date_gmt":"2015-08-31T09:53:40","guid":{"rendered":"http:\/\/haisins.epac.to\/wordpress\/?p=419"},"modified":"2015-08-31T09:53:40","modified_gmt":"2015-08-31T09:53:40","slug":"%ec%98%a8%eb%9d%bc%ec%9d%b8-%eb%b0%b1%ec%97%85-%ec%8a%a4%ed%81%ac%eb%a6%bd%ed%8a%b8-%eb%8d%b0%ec%9d%b4%ed%84%b0%ed%8c%8c%ec%9d%bc%ec%95%84%ec%b9%b4%ec%9d%b4%eb%b8%8c","status":"publish","type":"post","link":"http:\/\/haisins.synology.me\/wordpress\/?p=419","title":{"rendered":"\uc628\ub77c\uc778 \ubc31\uc5c5 \uc2a4\ud06c\ub9bd\ud2b8 \ub370\uc774\ud130\ud30c\uc77c\/\uc544\uce74\uc774\ube0c"},"content":{"rendered":"<p># \ub370\uc774\ud130\ud30c\uc77c \ubc31\uc5c5\uacfc archvie\ubc31\uc5c5 \uc258\uc740 \uc544\ub798\uc640 \uac19\uc2b5\ub2c8\ub2e4.&nbsp;<\/p>\n<p><\/p>\n<p>1. begin backup\ud560 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc218\ud589\ud569\ub2c8\ub2e4.&nbsp;<\/p>\n<p>dbbegin.sh&nbsp;<\/p>\n<p><\/p>\n<p>TBS_INFO=\/tmp\/tbs_info~.$$&nbsp;<\/p>\n<p><\/p>\n<p>sqlplus \/nolog &lt;&lt; EOF &gt; $TBS_INFO 2&gt;&amp;1&nbsp;<\/p>\n<p>connect \/ as sysdba;&nbsp;<\/p>\n<p>select &#8221;tablespace &#8221;||tablespace_name from dba_tablespaces;&nbsp;<\/p>\n<p>disconnect;&nbsp;<\/p>\n<p>exit&nbsp;<\/p>\n<p>EOF&nbsp;<\/p>\n<p><\/p>\n<p>cat $TBS_INFO | awk &#8221;$1 == &#8220;tablespace&#8221; { print $2 }&#8221; | while read LINE&nbsp;<\/p>\n<p>do&nbsp;<\/p>\n<p>export LINE&nbsp;<\/p>\n<p>echo &#8220;Issuing alter tablespace $LINE begin backup;&#8221;&nbsp;<\/p>\n<p>\/usr\/openv\/netbackup\/oracle\/table_begin.sh&nbsp;<\/p>\n<p>done&nbsp;<\/p>\n<p><\/p>\n<p>\\rm $TBS_INFO&nbsp;<\/p>\n<p><\/p>\n<p>2. \uc704\uc5d0\uc11c\uc758 table_begin.sh \ub294 \uc544\ub798\uc640 \uac19\uc2b5\ub2c8\ub2e4.&nbsp;<\/p>\n<p><\/p>\n<p>table_begin.sh&nbsp;<\/p>\n<p><\/p>\n<p>sqlplus \/nolog &lt;&lt; EOF &gt; \/dev\/null 2&gt;&amp;1&nbsp;<\/p>\n<p>connect \/ as sysdba;&nbsp;<\/p>\n<p>alter tablespace $LINE begin backup;&nbsp;<\/p>\n<p>disconnect;&nbsp;<\/p>\n<p>exit&nbsp;<\/p>\n<p>EOF&nbsp;<\/p>\n<p><\/p>\n<p>3. dbbegin.sh \uc744 \ud558\uac8c \ub418\uba74 \ud14c\uc774\ube14\uc2a4\ud398\uc774\uc2a4\uac00 backup mode\uac00 \ub429\ub2c8\ub2e4.&nbsp;<\/p>\n<p><\/p>\n<p><\/p>\n<p>4. \ub370\uc774\ud130\ud30c\uc77c \ub9ac\uc2a4\ud2b8\ub97c \ucd94\ucd9c\ud569\ub2c8\ub2e4.&nbsp;<\/p>\n<p>datafile_list&nbsp;<\/p>\n<p><\/p>\n<p>#!\/bin\/ksh&nbsp;<\/p>\n<p><\/p>\n<p>DATAFILE_INFO=\/tmp\/datafile_info~.$$&nbsp;<\/p>\n<p>datafile_list=\/tmp\/PROD_data_list&nbsp;<\/p>\n<p><\/p>\n<p>sqlplus \/nolog &lt;&lt; EOF &gt; $DATAFILE_INFO 2&gt;&amp;1&nbsp;<\/p>\n<p>connect \/ as sysdba;&nbsp;<\/p>\n<p>select &#8221;datafile_name &#8221;||file_name from dba_data_files;&nbsp;<\/p>\n<p>select &#8221;logfile_name &#8221;||member from v\\$logfile;&nbsp;<\/p>\n<p>select &#8221;controlfile_name &#8221;||name from v\\$controlfile;&nbsp;<\/p>\n<p>disconnect&nbsp;<\/p>\n<p>EOF&nbsp;<\/p>\n<p><\/p>\n<p>cat $DATAFILE_INFO | awk &#8221;$1 == &#8220;datafile_name&#8221; {print $2}&#8221;&nbsp;<\/p>\n<p>&gt; \/tmp\/PROD_dbfile_list&nbsp;<\/p>\n<p>cat $DATAFILE_INFO | awk &#8221;$1 == &#8220;logfile_name&#8221; {print $2}&#8221;&nbsp;<\/p>\n<p>&gt; \/tmp\/PROD_logfile_list&nbsp;<\/p>\n<p>cat $DATAFILE_INFO | awk &#8221;$1 == &#8220;controlfile_name&#8221; {print $2}&#8221;&nbsp;<\/p>\n<p>&gt; \/tmp\/PROD_controlfile_list&nbsp;<\/p>\n<p><\/p>\n<p>cat \/tmp\/PROD_dbfile_list &gt; $datafile_list&nbsp;<\/p>\n<p>cat \/tmp\/PROD_logfile_list &gt;&gt; $datafile_list&nbsp;<\/p>\n<p>cat \/tmp\/PROD_controlfile_list &gt;&gt; $datafile_list&nbsp;<\/p>\n<p><\/p>\n<p><\/p>\n<p>\\rm $DATAFILE_INFO&nbsp;<\/p>\n<p><\/p>\n<p>5. \ub370\uc774\ud130\ud30c\uc77c \ub9ac\uc2a4\ud2b8\ub97c netbackup\uc5d0\uc11c tape\ubc31\uc5c5\uc744 \ud558\ub3c4\ub85d \ud569\ub2c8\ub2e4.&nbsp;<\/p>\n<p>veritas netbackup\uc5d0\uc11c \ub9ac\uc2a4\ud2b8\ub9cc \uc8fc\uba74 \ubc31\uc5c5\ud574\uc90c..&nbsp;<\/p>\n<p><\/p>\n<p>6. end backup \uc744 \ub9cc\ub4dc\ub294 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc218\ud589&nbsp;<\/p>\n<p>dbend.sh&nbsp;<\/p>\n<p>#!\/bin\/ksh&nbsp;<\/p>\n<p><\/p>\n<p>TBS_INFO=\/tmp\/tbs_info~.$$&nbsp;<\/p>\n<p><\/p>\n<p>sqlplus \/nolog &lt;&lt; EOF &gt; $TBS_INFO 2&gt;&amp;1&nbsp;<\/p>\n<p>connect \/ as sysdba;&nbsp;<\/p>\n<p>select &#8221;tablespace &#8221;||tablespace_name from dba_tablespaces;&nbsp;<\/p>\n<p>disconnect;&nbsp;<\/p>\n<p>exit&nbsp;<\/p>\n<p>EOF&nbsp;<\/p>\n<p><\/p>\n<p>cat $TBS_INFO |awk &#8221;$1 == &#8220;tablespace&#8221; { print $2 }&#8221;|while read LINE&nbsp;<\/p>\n<p>do&nbsp;<\/p>\n<p>export LINE&nbsp;<\/p>\n<p>echo &#8220;Issuing alter tablespace $LINE end backup;&#8221;&nbsp;<\/p>\n<p>\/usr\/openv\/netbackup\/oracle\/table_end.sh&nbsp;<\/p>\n<p>done&nbsp;<\/p>\n<p>\\rm $TBS_INFO&nbsp;<\/p>\n<p><\/p>\n<p>7. \uc704\uc5d0\uc11c table_end.sh \ub294 \uc544\ub798\uc640 \uac19\uc2b5\ub2c8\ub2e4.&nbsp;<\/p>\n<p><\/p>\n<p>table_end.sh&nbsp;<\/p>\n<p>sqlplus \/nolog &lt;&lt; EOF &gt; \/dev\/null 2&gt;&amp;1&nbsp;<\/p>\n<p>connect \/ as sysdba;&nbsp;<\/p>\n<p>alter tablespace $LINE end backup;&nbsp;<\/p>\n<p>disconnect;&nbsp;<\/p>\n<p>exit&nbsp;<\/p>\n<p>EOF&nbsp;<\/p>\n<p><\/p>\n<p>6. archive log\uac00 \uc5c6\uc744 \uc218 \uc788\uc73c\ubbc0\ub85c \uc218\ub3d9\uc73c\ub85c log switch \ud574\uc90d\ub2c8\ub2e4.&nbsp;<\/p>\n<p><\/p>\n<p>arch_list_1&nbsp;<\/p>\n<p>#!\/bin\/ksh&nbsp;<\/p>\n<p><\/p>\n<p>sqlplus \/nolog &lt;&lt; EOF &gt; $LOG&nbsp;<\/p>\n<p>connect \/ as sysdba;&nbsp;<\/p>\n<p>alter system switch logfile;&nbsp;<\/p>\n<p>disconnect;&nbsp;<\/p>\n<p>exit;&nbsp;<\/p>\n<p>EOF&nbsp;<\/p>\n<p><\/p>\n<p><\/p>\n<p>7. archvie file\uc758 \ub9ac\uc2a4\ud2b8\ub97c \ubf51\uc544\ub0c5\ub2c8\ub2e4.&nbsp;<\/p>\n<p><\/p>\n<p>arch_list&nbsp;<\/p>\n<p><\/p>\n<p>#!\/bin\/ksh&nbsp;<\/p>\n<p><\/p>\n<p>TBS_INFO=\/tmp\/tbs_info~.$$&nbsp;<\/p>\n<p>ARCHIVE_DIR=\/tmp\/PROD_archive_dir.txt&nbsp;<\/p>\n<p><\/p>\n<p>sqlplus \/nolog &lt;&lt; EOF &gt; $LOG 2&gt;&amp;1&nbsp;<\/p>\n<p>connect \/ as sysdba;&nbsp;<\/p>\n<p>alter system switch logfile;&nbsp;<\/p>\n<p>disconnect;&nbsp;<\/p>\n<p>exit;&nbsp;<\/p>\n<p>EOF&nbsp;<\/p>\n<p><\/p>\n<p>sqlplus \/nolog &lt;&lt; EOF &gt; $TBS_INFO 2&gt;&amp;1&nbsp;<\/p>\n<p>connect \/ as sysdba;&nbsp;<\/p>\n<p>archive log list;&nbsp;<\/p>\n<p>disconnect;&nbsp;<\/p>\n<p>exit;&nbsp;<\/p>\n<p>EOF&nbsp;<\/p>\n<p><\/p>\n<p>cat $TBS_INFO | awk &#8221;$1 == &#8220;Archive&#8221; {print $3}&#8221; &gt; $ARCHIVE_DIR&nbsp;<\/p>\n<p><\/p>\n<p>ARCH_DIR=<\/p>\n<p>cat $ARCHIVE_DIR<\/p>\n<p><\/p>\n<p>ARCH_LIST_PROD=<\/p>\n<p>ls -ltr $ARCH_DIR\/*.arc |wc -l<\/p>\n<p><\/p>\n<p>echo &#8220;ARCH_LIST_PROD : $ARCH_LIST_PROD&#8221; &gt;&gt; $LOG&nbsp;<\/p>\n<p><\/p>\n<p>ARCH_LIST_PROD_1=<\/p>\n<p>expr$ARCH_LIST_PROD &#8211; 1<\/p>\n<p><\/p>\n<p>echo &#8220;ARCH_LIST_PROD_1 : $ARCH_LIST_PROD_1&#8221; &gt;&gt; $LOG&nbsp;<\/p>\n<p><\/p>\n<p>\/usr\/bin\/ls -ltr $ARCH_DIR\/*.arc |awk &#8221;{print $9}&#8221; |head &#8211;&nbsp;<\/p>\n<p>$ARCH_LIST_PROD_1 &gt; \/tmp\/PROD_arch_list&nbsp;<\/p>\n<p><\/p>\n<p>echo &#8220;Archive Log List Print&#8230;..O.k&#8230;.<\/p>\n<p>\/usr\/bin\/date +%c<\/p>\n<p>&#8221; &gt;&gt; $LOG&nbsp;<\/p>\n<p>#\\rm $TBS_INFO $ARCHIVE_DIR&nbsp;<\/p>\n<p><\/p>\n<p><\/p>\n<p>8. \uc704\uc5d0\uc11c \/tmp\/PROD_arch_list\uc5d0 \uc788\ub294 archive\ub9ac\uc2a4\ud2b8\ub97c veritas netbackup\uc5d0\uc11c \ub123\uc5b4\uc8fc\uba74 tape\ubc31\uc5c5\uc774 \ub429\ub2c8\ub2e4.\uadf8\ub9ac\uace0 \ud2b9\uc774\ud55c \uac83\uc740 archvie file\uc740 archive file\uc744 \ubc31\uc5c5\ud588\uc73c\uba74&nbsp;<span style=\"font-size: 9pt; line-height: 1.5;\">\uc9c0\uc6b0\ub3c4\ub85d \uc124\uc815<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p># \ub370\uc774\ud130\ud30c\uc77c \ubc31\uc5c5\uacfc archvie\ubc31\uc5c5 \uc258\uc740 \uc544\ub798\uc640 \uac19\uc2b5\ub2c8\ub2e4.&nbsp; 1. begin backup\ud560 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc218\ud589\ud569\ub2c8\ub2e4.&nbsp; dbbegin.sh&nbsp; TBS_INFO=\/tmp\/tbs_info~.$$&nbsp; sqlplus \/nolog &lt;&lt; EOF &gt; $TBS_INFO 2&gt;&amp;1&nbsp; connect \/ as sysdba;&nbsp; select &#8221;tablespace &#8221;||tablespace_name from dba_tablespaces;&nbsp; disconnect;&nbsp; exit&nbsp; EOF&nbsp; cat $TBS_INFO | awk &#8221;$1 == &#8220;tablespace&#8221; { print $2 }&#8221; | while read LINE&nbsp; do&nbsp; export LINE&nbsp; echo &#8220;Issuing alter tablespace [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"spay_email":""},"categories":[3],"tags":[167,168,169],"jetpack_featured_media_url":"","amp_enabled":true,"_links":{"self":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/419"}],"collection":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=419"}],"version-history":[{"count":0,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/419\/revisions"}],"wp:attachment":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}