{"id":880,"date":"2013-10-06T14:13:46","date_gmt":"2013-10-06T11:13:46","guid":{"rendered":"http:\/\/www.fatihacar.com\/blog\/?p=880"},"modified":"2013-11-01T16:16:13","modified_gmt":"2013-11-01T13:16:13","slug":"oracle-cold-offline-backup-and-restore","status":"publish","type":"post","link":"http:\/\/www.fatihacar.com\/blog\/oracle-cold-offline-backup-and-restore\/","title":{"rendered":"Oracle Cold-Offline Backup And Restore"},"content":{"rendered":"<p>You have to shutdown database to take offline backup. After shutdown database, you can take backup with two way that are rman backup database or copy Data Directory that is include datafiles, redo log files and control files.<\/p>\n<h3>Offline-Cold Backup Database<\/h3>\n<p><strong>1- Take Offline Backup With Rman<\/strong><\/p>\n<blockquote><p>\nSQL> shutdown immediate;<br \/>\nSQL> startup mount;<br \/>\nRMAN> backup database;<\/p><\/blockquote>\n<p><strong>2- Take Offline Backup With Copy Data Directory<\/strong><\/p>\n<blockquote><p>#> cp \/data\/ \/backup\/<br \/>\n<strong>Note :<\/strong> this \/data\/ directory includes data files, control file and redo log files.<\/p><\/blockquote>\n<h3>Restore Database From Offline-Cold Backup<\/h3>\n<p><strong>1- Restore From Data Directory Copy<\/strong><\/p>\n<blockquote><p>Install Oracle Software<br \/>\nEdit init.ora parameter file. That is in <Oracle-Base>\/dbhome\/dbs\/init.ora<br \/>\nChange <Oracle-Base> values with Oracle base path and change db name parameter.<br \/>\nChange Memory Target<br \/>\nAdd directory for not exists directories where pfile.ora. For example, diagnostic directory.<br \/>\nConnect Oracle Db sqlplus \/ as sysdba<br \/>\nSQL> create spfile from pfile=&#8217;\/pathofparameterfile\/init.ora&#8217;<br \/>\nSQL> startup;<br \/>\nRestore is completed.<\/p><\/blockquote>\n<p><!--more--><br \/>\n<strong>2- Restore Database From Rman Offline Backup<\/strong><\/p>\n<blockquote><p>Install Oracle Software<br \/>\n#> rman target \/<br \/>\nrman> set dbid=123124123    \/\/that is your db id. You can find from controlfile backup name, if you use %F contorolfile backup format.<br \/>\nrman> startup nomount force;<br \/>\nrman> restore spfile from &#8216;controlfilebackup_123124123.ctl&#8217;<br \/>\nSQL> create pfile=\/tmp\/pfile.ora&#8217; from spfile;<br \/>\n#> vi pfile.ora<br \/>\nYou have to configure pfile.ora for your new server path and memory. If not exist directories, you have to create.<br \/>\nSQL> create spfile from pfile=&#8217;\/tmp\/pfile.ora&#8217;;<br \/>\nSQL> shutdown abort;<br \/>\nSQL> startup nomount;<br \/>\nRMAN> restore controlfile from &#8216;controlfilebackup_123124123.ctl&#8217;;<br \/>\nSQL> alter database mount;<br \/>\nRMAN> list backup;<br \/>\nRMAN> restore database;<br \/>\nSQL> alter database open resetlogs;<\/p>\n<p>Restore is completed.\n<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>You have to shutdown database to take offline backup. After shutdown database, you can take backup with two way that are rman backup database or copy Data Directory that is include datafiles, redo log files and control files. Offline-Cold Backup Database 1- Take Offline Backup With Rman SQL> shutdown immediate; SQL> startup mount; RMAN> backup&#8230;<\/p>\n","protected":false},"author":37,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9,20],"tags":[14,90,32,49,48],"class_list":["post-880","post","type-post","status-publish","format-standard","hentry","category-administration","category-oracle-backup-and-recovery","tag-database-administration","tag-oracle","tag-oracle-administration","tag-oracle-backup-and-restore","tag-oracle-rman-backup"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p39NFI-ec","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/comments?post=880"}],"version-history":[{"count":3,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/880\/revisions"}],"predecessor-version":[{"id":890,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/posts\/880\/revisions\/890"}],"wp:attachment":[{"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/media?parent=880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/categories?post=880"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.fatihacar.com\/blog\/wp-json\/wp\/v2\/tags?post=880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}