{"id":5018,"date":"2015-06-23T18:03:35","date_gmt":"2015-06-23T16:03:35","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/"},"modified":"2015-06-23T18:03:35","modified_gmt":"2015-06-23T16:03:35","slug":"2-ways-to-move-archivelogs-both-need-rman","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/","title":{"rendered":"2 ways to move archivelogs &#8211; both need RMAN"},"content":{"rendered":"<h2>By Franck Pachot<\/h2>\n<p>.<br \/>\nThe database must know where are the files. If you move them from the OS, the database will not be aware of it. But there is a database tool to copy or move files and update the database repository (controlfile). It&#8217;s RMAN. With RMAN you can either:<\/p>\n<ul>\n<li>update the repository after you&#8217;ve moved the file from the OS<\/li>\n<li>or do the both: move and update the repository<\/li>\n<\/ul>\n<p>The syntax is a bit weird, so let&#8217;s have an example.<\/p>\n<h3>RMAN&gt; CATALOG<\/h3>\n<p>I have the following archived logs in the \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23 directory:<\/p>\n<pre><code>[oracle@VM111 2015_06_23]$ pwd \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23 \n[oracle@VM111 2015_06_23]$ ls -alrt total 188 \ndrwxr-x---. 5 oracle oinstall 4096 Jun 23 21:40 .. \n-rw-r-----. 1 oracle oinstall 120320 Jun 23 21:44 o1_mf_1_61_brmfrl7v_.arc \n-rw-r-----. 1 oracle oinstall 3584 Jun 23 21:44 o1_mf_1_62_brmfrq6c_.arc \n-rw-r-----. 1 oracle oinstall 2560 Jun 23 21:44 o1_mf_1_63_brmfrsts_.arc \n-rw-r-----. 1 oracle oinstall 1536 Jun 23 21:44 o1_mf_1_64_brmfrtjs_.arc \n-rw-r-----. 1 oracle oinstall 30208 Jun 23 21:45 o1_mf_1_65_brmft8n5_.arc \n-rw-r-----. 1 oracle oinstall 6144 Jun 23 21:45 o1_mf_1_66_brmftlpg_.arc \n-rw-r-----. 1 oracle oinstall 4096 Jun 23 21:45 o1_mf_1_67_brmftr8w_.arc \n-rw-r-----. 1 oracle oinstall 2560 Jun 23 21:45 o1_mf_1_68_brmftvwn_.arc \ndrwxr-x---. 2 oracle oinstall 4096 Jun 23 21:45 .<\/code><\/pre>\n<p>and I move them to \/u01\/DEMO\/temp\/:<\/p>\n<pre><code>[oracle@VM111 2015_06_23]$ mv * \/u01\/DEMO\/temp\/<\/code><\/pre>\n<p>my current directory is empty:<\/p>\n<pre><code>[oracle@VM111 2015_06_23]$ ls -alrt total 8 drwxr-x---. 5 oracle oinstall 4096 Jun 23 21:40 .. drwxr-x---. 2 oracle oinstall 4096 Jun 23 21:50 .<\/code><\/pre>\n<p>and the \/u01 one has my archived logs:<\/p>\n<pre><code>[oracle@VM111 2015_06_23]$ ls -alrt \/u01\/DEMO\/temp total 188 \n-rw-r-----. 1 oracle oinstall 120320 Jun 23 21:44 o1_mf_1_61_brmfrl7v_.arc \n-rw-r-----. 1 oracle oinstall 3584 Jun 23 21:44 o1_mf_1_62_brmfrq6c_.arc \n-rw-r-----. 1 oracle oinstall 2560 Jun 23 21:44 o1_mf_1_63_brmfrsts_.arc \n-rw-r-----. 1 oracle oinstall 1536 Jun 23 21:44 o1_mf_1_64_brmfrtjs_.arc \n-rw-r-----. 1 oracle oinstall 30208 Jun 23 21:45 o1_mf_1_65_brmft8n5_.arc \n-rw-r-----. 1 oracle oinstall 6144 Jun 23 21:45 o1_mf_1_66_brmftlpg_.arc \n-rw-r-----. 1 oracle oinstall 4096 Jun 23 21:45 o1_mf_1_67_brmftr8w_.arc \n-rw-r-----. 1 oracle oinstall 2560 Jun 23 21:45 o1_mf_1_68_brmftvwn_.arc \ndrwxr-x---. 10 oracle oinstall 4096 Jun 23 21:49 .. \ndrwxr-xr-x. 2 oracle oinstall 4096 Jun 23 21:50 . \n[oracle@VM111 2015_06_23]$<\/code><\/pre>\n<p>But let&#8217;s list the archived logs from RMAN:<\/p>\n<pre><code>[oracle@VM111 2015_06_23]$ rman target \/\nRecovery Manager: Release 12.1.0.2.0 - Production on Tue Jun 23 21:50:48 2015\nCopyright (c) 1982, 2014, Oracle and\/or its affiliates.  All rights reserved.\nconnected to target database: DEMO11 (DBID=684456715)\n&nbsp;\nRMAN&gt; list archivelog all;\n&nbsp;\nusing target database control file instead of recovery catalog\nList of Archived Log Copies for database with db_unique_name DEMO11\n=====================================================================\n&nbsp;\nKey     Thrd Seq     S Low Time\n------- ---- ------- - ---------\n82      1    61      A 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_61_brmfrl7v_.arc\n84      1    62      A 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_62_brmfrq6c_.arc\n86      1    63      A 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_63_brmfrsts_.arc\n88      1    64      A 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_64_brmfrtjs_.arc\n90      1    65      A 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_65_brmft8n5_.arc\n92      1    66      A 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_66_brmftlpg_.arc\n94      1    67      A 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_67_brmftr8w_.arc\n96      1    68      A 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_68_brmftvwn_.arc\n<\/code><\/pre>\n<p>the repository (in the controlfile) still have the old location. If I need the redologs to recover the database, then it will fail.<\/p>\n<p>The CROSSCHECK command can be used so that RMAN verifies if the files are still there:<\/p>\n<pre><code>RMAN&gt; crosscheck archivelog all;\nallocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=75 device type=DISK \nvalidation failed for archived log archived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_61_brmfrl7v_.arc RECID=82 STAMP=883172658 \nvalidation failed for archived log archived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_62_brmfrq6c_.arc RECID=84 STAMP=883172663 \nvalidation failed for archived log archived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_63_brmfrsts_.arc RECID=86 STAMP=883172665 \nvalidation failed for archived log archived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_64_brmfrtjs_.arc RECID=88 STAMP=883172666 \nvalidation failed for archived log archived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_65_brmft8n5_.arc RECID=90 STAMP=883172712 \nvalidation failed for archived log archived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_66_brmftlpg_.arc RECID=92 STAMP=883172722 \nvalidation failed for archived log archived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_67_brmftr8w_.arc RECID=94 STAMP=883172728 \nvalidation failed for archived log archived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_68_brmftvwn_.arc RECID=96 STAMP=883172731 \nCrosschecked 8 objects<\/code><\/pre>\n<p>validation failed for all of them. They are marked as EXPIRED:<\/p>\n<pre><code>RMAN&gt; list archivelog all;\n&nbsp;\nList of Archived Log Copies for database with db_unique_name DEMO11\n=====================================================================\n&nbsp;\nKey     Thrd Seq     S Low Time\n------- ---- ------- - ---------\n82      1    61      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_61_brmfrl7v_.arc\n84      1    62      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_62_brmfrq6c_.arc\n86      1    63      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_63_brmfrsts_.arc\n88      1    64      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_64_brmfrtjs_.arc\n90      1    65      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_65_brmft8n5_.arc\n92      1    66      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_66_brmftlpg_.arc\n94      1    67      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_67_brmftr8w_.arc\n96      1    68      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_68_brmftvwn_.arc\n<\/code><\/pre>\n<p>which means that the database do not know any archived logs now.<\/p>\n<p>I did only one part of the job. Now I need to register the new location with the CATALOG command:<\/p>\n<pre><code>RMAN&gt; catalog start with '\/u01\/DEMO\/temp';\n&nbsp;\nsearching for all files that match the pattern \/u01\/DEMO\/temp\n&nbsp;\nList of Files Unknown to the Database\n=====================================\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_64_brmfrtjs_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_68_brmftvwn_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_66_brmftlpg_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_67_brmftr8w_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_65_brmft8n5_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_62_brmfrq6c_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_63_brmfrsts_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_61_brmfrl7v_.arc\n&nbsp;\nDo you really want to catalog the above files (enter YES or NO)? YES\ncataloging files...\ncataloging done\n&nbsp;\nList of Cataloged Files\n=======================\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_64_brmfrtjs_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_68_brmftvwn_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_66_brmftlpg_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_67_brmftr8w_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_65_brmft8n5_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_62_brmfrq6c_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_63_brmfrsts_.arc\nFile Name: \/u01\/DEMO\/temp\/o1_mf_1_61_brmfrl7v_.arc\n<\/code><\/pre>\n<p>the file types and the header is read to see if the file belongs to this database. Then they are registered. Before listing them, I remove the expired entries:<\/p>\n<pre><code>RMAN&gt; delete expired archivelog all;\n&nbsp;\nreleased channel: ORA_DISK_1\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=75 device type=DISK\nList of Archived Log Copies for database with db_unique_name DEMO11\n=====================================================================\n&nbsp;\nKey     Thrd Seq     S Low Time\n------- ---- ------- - ---------\n82      1    61      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_61_brmfrl7v_.arc\n84      1    62      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_62_brmfrq6c_.arc\n86      1    63      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_63_brmfrsts_.arc\n88      1    64      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_64_brmfrtjs_.arc\n90      1    65      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_65_brmft8n5_.arc\n92      1    66      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_66_brmftlpg_.arc\n94      1    67      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_67_brmftr8w_.arc\n96      1    68      X 23-JUN-15\n        Name: \/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_68_brmftvwn_.arc\n&nbsp;\nDo you really want to delete the above objects (enter YES or NO)? YES\ndeleted archived log\narchived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_61_brmfrl7v_.arc RECID=82 STAMP=883172658\ndeleted archived log\narchived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_62_brmfrq6c_.arc RECID=84 STAMP=883172663\ndeleted archived log\narchived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_63_brmfrsts_.arc RECID=86 STAMP=883172665\ndeleted archived log\narchived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_64_brmfrtjs_.arc RECID=88 STAMP=883172666\ndeleted archived log\narchived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_65_brmft8n5_.arc RECID=90 STAMP=883172712\ndeleted archived log\narchived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_66_brmftlpg_.arc RECID=92 STAMP=883172722\ndeleted archived log\narchived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_67_brmftr8w_.arc RECID=94 STAMP=883172728\ndeleted archived log\narchived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_68_brmftvwn_.arc RECID=96 STAMP=883172731\nDeleted 8 EXPIRED objects\n<\/code><\/pre>\n<p>and I can verify that a crosscheck validates all my files from the new location:<\/p>\n<pre><code>RMAN&gt; crosscheck archivelog all;\n&nbsp;\nreleased channel: ORA_DISK_1\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=75 device type=DISK\nvalidation succeeded for archived log\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_61_brmfrl7v_.arc RECID=104 STAMP=883173169\nvalidation succeeded for archived log\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_62_brmfrq6c_.arc RECID=102 STAMP=883173169\nvalidation succeeded for archived log\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_63_brmfrsts_.arc RECID=103 STAMP=883173169\nvalidation succeeded for archived log\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_64_brmfrtjs_.arc RECID=97 STAMP=883173169\nvalidation succeeded for archived log\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_65_brmft8n5_.arc RECID=101 STAMP=883173169\nvalidation succeeded for archived log\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_66_brmftlpg_.arc RECID=99 STAMP=883173169\nvalidation succeeded for archived log\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_67_brmftr8w_.arc RECID=100 STAMP=883173169\nvalidation succeeded for archived log\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_68_brmftvwn_.arc RECID=98 STAMP=883173169\nCrosschecked 8 objects\n<\/code><\/pre>\n<h3>RMAN&gt; BACKUP AS COPY<\/h3>\n<p>Let&#8217;s do the same in one command. RMAN is there to do backups. Backups can go to backupsets or they can be a simple copy with BACKUP AS COPY. The destination is defined with the backup FORMAT string. And if we want to move instead of copy, we just add the DELETE INPUT.<\/p>\n<pre><code>RMAN&gt; backup as copy archivelog all format '\/u03\/DEMO\/temp\/%U' delete input;\n&nbsp;\nStarting backup at 23-JUN-15\ncurrent log archived\nusing channel ORA_DISK_1\nchannel ORA_DISK_1: starting archived log copy\ninput archived log thread=1 sequence=69 RECID=106 STAMP=883173353\noutput file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-69_T-1_A-880845261_0bqa8a0b RECID=109 STAMP=883173387\nchannel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01\nchannel ORA_DISK_1: deleting archived log(s)\narchived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_69_brmgg9on_.arc RECID=106 STAMP=8\n83173353\nchannel ORA_DISK_1: starting archived log copy\ninput archived log thread=1 sequence=61 RECID=104 STAMP=883173169\noutput file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-61_T-1_A-880845261_0cqa8a0d RECID=110 STAMP=883173389\nchannel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01\nchannel ORA_DISK_1: deleting archived log(s)\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_61_brmfrl7v_.arc RECID=104 STAMP=883173169\nchannel ORA_DISK_1: starting archived log copy\ninput archived log thread=1 sequence=65 RECID=101 STAMP=883173169\noutput file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-65_T-1_A-880845261_0dqa8a0e RECID=111 STAMP=883173390\nchannel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01\nchannel ORA_DISK_1: deleting archived log(s)\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_65_brmft8n5_.arc RECID=101 STAMP=883173169\nchannel ORA_DISK_1: starting archived log copy\ninput archived log thread=1 sequence=70 RECID=108 STAMP=883173387\noutput file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-70_T-1_A-880845261_0eqa8a0f RECID=112 STAMP=883173391\nchannel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01\nchannel ORA_DISK_1: deleting archived log(s)\narchived log file name=\/u02\/DEMO\/fast_recovery_area\/DEMO11\/archivelog\/2015_06_23\/o1_mf_1_70_brmghct5_.arc RECID=108 STAMP=8\n83173387\nchannel ORA_DISK_1: starting archived log copy\ninput archived log thread=1 sequence=66 RECID=99 STAMP=883173169\noutput file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-66_T-1_A-880845261_0fqa8a0g RECID=113 STAMP=883173392\nchannel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01\nchannel ORA_DISK_1: deleting archived log(s)\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_66_brmftlpg_.arc RECID=99 STAMP=883173169\nchannel ORA_DISK_1: starting archived log copy\ninput archived log thread=1 sequence=67 RECID=100 STAMP=883173169\noutput file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-67_T-1_A-880845261_0gqa8a0h RECID=114 STAMP=883173393\nchannel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01\nchannel ORA_DISK_1: deleting archived log(s)\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_67_brmftr8w_.arc RECID=100 STAMP=883173169\nchannel ORA_DISK_1: starting archived log copy\ninput archived log thread=1 sequence=62 RECID=102 STAMP=883173169\noutput file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-62_T-1_A-880845261_0hqa8a0i RECID=115 STAMP=883173394\nchannel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01\nchannel ORA_DISK_1: deleting archived log(s)\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_62_brmfrq6c_.arc RECID=102 STAMP=883173169\nchannel ORA_DISK_1: starting archived log copy\ninput archived log thread=1 sequence=63 RECID=103 STAMP=883173169\noutput file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-63_T-1_A-880845261_0iqa8a0j RECID=116 STAMP=883173395\nchannel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01\nchannel ORA_DISK_1: deleting archived log(s)\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_63_brmfrsts_.arc RECID=103 STAMP=883173169\nchannel ORA_DISK_1: starting archived log copy\ninput archived log thread=1 sequence=68 RECID=98 STAMP=883173169\noutput file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-68_T-1_A-880845261_0jqa8a0k RECID=117 STAMP=883173396\nchannel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01\nchannel ORA_DISK_1: deleting archived log(s)\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_68_brmftvwn_.arc RECID=98 STAMP=883173169\nchannel ORA_DISK_1: starting archived log copy\ninput archived log thread=1 sequence=64 RECID=97 STAMP=883173169\noutput file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-64_T-1_A-880845261_0kqa8a0l RECID=118 STAMP=883173397\nchannel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01\nchannel ORA_DISK_1: deleting archived log(s)\narchived log file name=\/u01\/DEMO\/temp\/o1_mf_1_64_brmfrtjs_.arc RECID=97 STAMP=883173169\nFinished backup at 23-JUN-15\n<\/code><\/pre>\n<p>The syntax is very different from a move command but it&#8217;s the same. The file names may have changed (because of the %U format) but who cares? Only RMAN should know what is inside the files. You have a repository (controlfile or rman catalog) which knows all the attributes about the files (DBID, thread#, sequence#, SCN, etc) so better rely on that rather than on a file name and timestamp.<\/p>\n<p>Look at the files, they are now in my third destination:<\/p>\n<pre><code>RMAN&gt; list archivelog all;\n&nbsp;\nList of Archived Log Copies for database with db_unique_name DEMO11\n=====================================================================\n&nbsp;\nKey     Thrd Seq     S Low Time\n------- ---- ------- - ---------\n110     1    61      A 23-JUN-15\n        Name: \/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-61_T-1_A-880845261_0cqa8a0d\n115     1    62      A 23-JUN-15\n        Name: \/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-62_T-1_A-880845261_0hqa8a0i\n116     1    63      A 23-JUN-15\n        Name: \/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-63_T-1_A-880845261_0iqa8a0j\n118     1    64      A 23-JUN-15\n        Name: \/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-64_T-1_A-880845261_0kqa8a0l\n111     1    65      A 23-JUN-15\n        Name: \/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-65_T-1_A-880845261_0dqa8a0e\n113     1    66      A 23-JUN-15\n        Name: \/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-66_T-1_A-880845261_0fqa8a0g\n114     1    67      A 23-JUN-15\n        Name: \/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-67_T-1_A-880845261_0gqa8a0h\n117     1    68      A 23-JUN-15\n        Name: \/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-68_T-1_A-880845261_0jqa8a0k\n109     1    69      A 23-JUN-15\n        Name: \/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-69_T-1_A-880845261_0bqa8a0b\n112     1    70      A 23-JUN-15\n        Name: \/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-70_T-1_A-880845261_0eqa8a0f\n<\/code><\/pre>\n<p>and a crosscheck validates that they are accesible there:<\/p>\n<pre><code>RMAN&gt; crosscheck archivelog all;\n&nbsp;\nreleased channel: ORA_DISK_1\nallocated channel: ORA_DISK_1\nchannel ORA_DISK_1: SID=75 device type=DISK\nvalidation succeeded for archived log\narchived log file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-61_T-1_A-880845261_0cqa8a0d RECID=110 STAMP=883173389\nvalidation succeeded for archived log\narchived log file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-62_T-1_A-880845261_0hqa8a0i RECID=115 STAMP=883173394\nvalidation succeeded for archived log\narchived log file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-63_T-1_A-880845261_0iqa8a0j RECID=116 STAMP=883173395\nvalidation succeeded for archived log\narchived log file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-64_T-1_A-880845261_0kqa8a0l RECID=118 STAMP=883173397\nvalidation succeeded for archived log\narchived log file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-65_T-1_A-880845261_0dqa8a0e RECID=111 STAMP=883173390\nvalidation succeeded for archived log\narchived log file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-66_T-1_A-880845261_0fqa8a0g RECID=113 STAMP=883173392\nvalidation succeeded for archived log\narchived log file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-67_T-1_A-880845261_0gqa8a0h RECID=114 STAMP=883173393\nvalidation succeeded for archived log\narchived log file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-68_T-1_A-880845261_0jqa8a0k RECID=117 STAMP=883173396\nvalidation succeeded for archived log\narchived log file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-69_T-1_A-880845261_0bqa8a0b RECID=109 STAMP=883173387\nvalidation succeeded for archived log\narchived log file name=\/u03\/DEMO\/temp\/arch_D-DEMO11_id-684456715_S-70_T-1_A-880845261_0eqa8a0f RECID=112 STAMP=883173391\nCrosschecked 10 objects\n<\/code><\/pre>\n<h3>Conclusion<\/h3>\n<p>Which one do you prefer? Managing database files from the OS is old-style. You are doing your backups with RMAN, so why not use RMAN to do any operations on the files. Then you are sure that the repository is up to date. When you will need your archivelogs to recover, you don&#8217;t want to waste time finding where an archived logs has been moved one day by a collegue that forgot to re-catalog them because of the emergency situation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Franck Pachot . The database must know where are the files. If you move them from the OS, the database will not be aware of it. But there is a database tool to copy or move files and update the database repository (controlfile). It&#8217;s RMAN. With RMAN you can either: update the repository after [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,59],"tags":[593,96],"type_dbi":[],"class_list":["post-5018","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","category-oracle","tag-fra","tag-oracle"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>2 ways to move archivelogs - both need RMAN - dbi Blog<\/title>\n<meta name=\"description\" content=\"Move archivelogs with RMAN.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"2 ways to move archivelogs - both need RMAN\" \/>\n<meta property=\"og:description\" content=\"Move archivelogs with RMAN.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-23T16:03:35+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"2 ways to move archivelogs &#8211; both need RMAN\",\"datePublished\":\"2015-06-23T16:03:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/\"},\"wordCount\":499,\"commentCount\":0,\"keywords\":[\"fra\",\"Oracle\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/\",\"name\":\"2 ways to move archivelogs - both need RMAN - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2015-06-23T16:03:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"description\":\"Move archivelogs with RMAN.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"2 ways to move archivelogs &#8211; both need RMAN\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"2 ways to move archivelogs - both need RMAN - dbi Blog","description":"Move archivelogs with RMAN.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/","og_locale":"en_US","og_type":"article","og_title":"2 ways to move archivelogs - both need RMAN","og_description":"Move archivelogs with RMAN.","og_url":"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/","og_site_name":"dbi Blog","article_published_time":"2015-06-23T16:03:35+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"2 ways to move archivelogs &#8211; both need RMAN","datePublished":"2015-06-23T16:03:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/"},"wordCount":499,"commentCount":0,"keywords":["fra","Oracle"],"articleSection":["Database Administration &amp; Monitoring","Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/","url":"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/","name":"2 ways to move archivelogs - both need RMAN - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2015-06-23T16:03:35+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"description":"Move archivelogs with RMAN.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/2-ways-to-move-archivelogs-both-need-rman\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"2 ways to move archivelogs &#8211; both need RMAN"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/5018","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=5018"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/5018\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=5018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=5018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=5018"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=5018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}