Home » RDBMS Server » Backup & Recovery » incremental rman backups (merged) (11.2, windows 2003)
incremental rman backups (merged) [message #569206] |
Mon, 22 October 2012 13:36 |
dmarcus48
Messages: 44 Registered: May 2008 Location: Central NJ
|
Member |
|
|
I've got a question. Can you take an incremental backup level 1 or level 0 WITHOUT archivelogs?
syntax would be
backup as compressed backupset cummulative level 1 database.
The reason I ask is because when I run
backup as compressed backupset cummulative level 1 database plus archivelogs # it runs fine, but when I run
backup as compressed backupset cummulative level 1 database it just hangs.
So I ask the question
TIA
Dave
|
|
|
|
Re: incremental rman backups [message #569239 is a reply to message #569216] |
Tue, 23 October 2012 07:18 |
dmarcus48
Messages: 44 Registered: May 2008 Location: Central NJ
|
Member |
|
|
OK, Thanks, that might be it, this is my entire script, you can see that I'm NOT in mount state. I'll modify and let you know, thanks again.
connect target /@orcl
connect catalog rman/pw@catdb
RUN
{
sql 'alter session set nls_date_format="DD-MON-YYYY HH24:MI:SS"';
crosscheck backup;
delete noprompt obsolete;
delete noprompt expired backup;
sql 'alter system archive log current';
allocate channel c1 device type disk format 'F:\oracle\admin\orcl\backup\%U';
backup AS COMPRESSED BACKUPSET incremental level 1 cumulative database;
backup current controlfile;
restore validate database;
}
list backup summary;
list backupset;
list backup of controlfile;
exit;
|
|
|
Rman incremental without including archive logs?? Possible? [message #569318 is a reply to message #569206] |
Wed, 24 October 2012 13:00 |
dmarcus48
Messages: 44 Registered: May 2008 Location: Central NJ
|
Member |
|
|
Number 1, I'm not sure this can be done. I'm being asked to create backups in this manner:
Level 0
Level 1
ARCHIVELOGS
I've go just the archive logs to work fine, but am having problems with the level 0 and level 1, here's the ctl file:
connect target /@ORCL
RUN
{
sql 'alter session set nls_date_format="DD-MON-YYYY HH24:MI:SS"';
crosscheck backup;
delete noprompt obsolete;
delete noprompt expired backup;
sql 'alter system archive log current';
shutdown immediate;
startup mount;
allocate channel c1 device type disk format 'UNCPATH\ORCL\FULL\%U';
backup AS COMPRESSED BACKUPSET incremental level 0 cumulative database;
backup current controlfile;
sql 'alter database open';
restore validate database;
}
list backup summary;
list backupset;
list backup of controlfile;
exit;
Like I said I'm not sure this can be done, in the past we've always done it like this:
backup AS COMPRESSED BACKUPSET incremental level 0 cumulative database plus archivelog delete input;
But now I'm being asked to separate the archivelogs out (WHY? I don't know).
Is it possible to take an incremental backup without including the archivelogs????
This is the output from the logfile:
RMAN> connect target *
2>
3> RUN
4> {
5> sql 'alter session set nls_date_format="DD-MON-YYYY HH24:MI:SS"';
6> crosscheck backup;
7> delete noprompt obsolete;
8> delete noprompt expired backup;
9> sql 'alter system archive log current';
10> shutdown immediate;
11> startup mount;
12> allocate channel c1 device type disk format '\\UNCPATH\data\ORCL\INCR\%U';
13> backup AS COMPRESSED BACKUPSET incremental level 1 cumulative database;
14> backup current controlfile;
15> restore validate database;
16> }
17>
18> list backup summary;
19> list backupset;
20> list backup of controlfile;
21>
22> exit;
sql statement: alter system archive log current
database closed
database dismounted
Oracle instance shut down
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 1071333376 bytes
Fixed Size 1348508 bytes
Variable Size 704646244 bytes
Database Buffers 360710144 bytes
Redo Buffers 4628480 bytes
allocated channel: c1
channel c1: SID=211 device type=DISK
Starting backup at 24-OCT-2012 13:43:53
That's it, it comes back to dos at this point.
TIA
Dave
[Updated on: Wed, 24 October 2012 13:06] Report message to a moderator
|
|
|
|
|
Re: incremental rman backups [message #569326 is a reply to message #569324] |
Wed, 24 October 2012 14:33 |
dmarcus48
Messages: 44 Registered: May 2008 Location: Central NJ
|
Member |
|
|
Thanks for the merge. I don't know, I thought it was a new topic, but it really wasn't.
What I've got is a batch file that will allow for input as to the type of rman backup.
It works if I format the backup like this:
backup AS COMPRESSED BACKUPSET level 1 cumulative database plus archivelog;
Doesn't work if I put this:
backup AS COMPRESSED BACKUPSET level 1 cumulative database;
This is with a shutdown immediate and a startup mount on both. Plus archivelog works, without it, doesn't work.
Thanks again,
Dave
|
|
|
|
Re: incremental rman backups [message #569352 is a reply to message #569326] |
Thu, 25 October 2012 03:49 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Dave, I don't understand what is going on. You say this,Quote:It works if I format the backup like this:
backup AS COMPRESSED BACKUPSET level 1 cumulative database plus archivelog;
Doesn't work if I put this:
backup AS COMPRESSED BACKUPSET level 1 cumulative database; but those are both syntactically wrong:RMAN> backup AS COMPRESSED BACKUPSET level 1 cumulative database;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "level": expecting one of: "archivelog, as, auxiliary, backu
y, cumulative, current, database, datafilecopy, datafile, db_file_name_convert, db_recovery_
, format, for, from, full, incremental, keep, maxsetsize, nochecksum, noexclude, nokeep, not
ip, spfile, tablespace, tag, to, validate, ("
RMAN-01007: at line 1 column 32 file: standard input
RMAN> backup AS COMPRESSED BACKUPSET level 1 cumulative database plus archivelog;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "level": expecting one of: "archivelog, as, auxiliary, backu
y, cumulative, current, database, datafilecopy, datafile, db_file_name_convert, db_recovery_
, format, for, from, full, incremental, keep, maxsetsize, nochecksum, noexclude, nokeep, not
ip, spfile, tablespace, tag, to, validate, ("
RMAN-01007: at line 1 column 32 file: standard input
RMAN> what are you actually trying to achieve? You can do an incremental level 1 backup of a database that is in archivelog mode, whether it is open or mounted. You would want the archivelogs too, but you can back them up whenever you want. A noarchivelog mode database can be incrementally backed up only if it is mounted.
|
|
|
|
Re: incremental rman backups [message #569379 is a reply to message #569352] |
Thu, 25 October 2012 07:31 |
dmarcus48
Messages: 44 Registered: May 2008 Location: Central NJ
|
Member |
|
|
First of all, thanks for the replies, I do appreciate them. I do know rman and have always used backup as compressed backupset database plus archivelog delete input. The company I'm working for has asked us to change the way we do our backups to comply with the way that they do backups. They want us to take the archivelog backups separately, and to do incremental backups (level 1 and level 0 (on Sunday)), additionally the backups are going across the network to a UNC address. The UNC address hasn't given me any problems.
Below John said that my syntax is off, "backup AS COMPRESSED BACKUPSET level 1 cumulative database plus archivelog;", all I can say is that it works for me. The other example "backup AS COMPRESSED BACKUPSET level 1 cumulative database", does not work, but does not give a syntax error, it just says in the log that the backup has started and never comes back (goes off into the night).
Also my manager has asked that I write a script for the backups that will use input variables, one script for all backups. I've written that, the archivelogs work fine, as do the backups when I include the archivelogs, but not when I don't.
My main question is "can you do a incremental backup without including the archivelogs??" It doesn't seem so, I've tried it including the shutdown immediate and startup mount, and I get the same results.
TIA
Dave
|
|
|
Re: incremental rman backups [message #569380 is a reply to message #569379] |
Thu, 25 October 2012 07:39 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Man, your code does not work. Again:c:\users\john\home>rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Oct 25 13:36:02 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1324534707)
RMAN> backup AS COMPRESSED BACKUPSET level 1 cumulative database plus archivelog;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "level": expecting one of: "archivelog, as, auxiliary, backu
y, cumulative, current, database, datafilecopy, datafile, db_file_name_convert, db_recovery_
, format, for, from, full, incremental, keep, maxsetsize, nochecksum, noexclude, nokeep, not
ip, spfile, tablespace, tag, to, validate, ("
RMAN-01007: at line 1 column 32 file: standard input
RMAN>
What I think you are trying to do is this,RMAN> backup AS COMPRESSED BACKUPSET incremental level 1 cumulative database;
Starting backup at 25-OCT-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=9 device type=DISK
channel ORA_DISK_1: starting compressed incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=C:\APP\JOHN\ORADATA\ORCL\DATAFILE\O1_MF_SYSTE
input datafile file number=00002 name=C:\APP\JOHN\ORADATA\ORCL\DATAFILE\O1_MF_SYSAU
input datafile file number=00003 name=C:\APP\JOHN\ORADATA\ORCL\DATAFILE\O1_MF_UNDOT
input datafile file number=00004 name=C:\APP\JOHN\ORADATA\ORCL\DATAFILE\O1_MF_USERS
channel ORA_DISK_1: starting piece 1 at 25-OCT-12
channel ORA_DISK_1: finished piece 1 at 25-OCT-12
piece handle=C:\APP\JOHN\FAST_RECOVERY_AREA\ORCL\BACKUPSET\2012_10_25\O1_MF_NNND1_T
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:56
channel ORA_DISK_1: starting compressed incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 25-OCT-12
channel ORA_DISK_1: finished piece 1 at 25-OCT-12
piece handle=C:\APP\JOHN\FAST_RECOVERY_AREA\ORCL\BACKUPSET\2012_10_25\O1_MF_NCSN1_T
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 25-OCT-12 which does work. Without the archive logs.
|
|
|
Re: incremental rman backups [message #569381 is a reply to message #569380] |
Thu, 25 October 2012 08:00 |
dmarcus48
Messages: 44 Registered: May 2008 Location: Central NJ
|
Member |
|
|
John, it works for me:
RMAN> connect target *
2>
3> RUN
4> {
5> sql 'alter session set nls_date_format="DD-MON-YYYY HH24:MI:SS"';
6> crosscheck backup;
7> delete noprompt obsolete;
8> delete noprompt expired backup;
9> delete noprompt expired archivelog all;
10> sql 'alter system archive log current';
11> shutdown immediate;
12> startup mount;
13> allocate channel c1 device type disk format '\\UNCPATH\ORCL\INCR\%U';
14> backup AS COMPRESSED BACKUPSET incremental level 1 cumulative database plus archivelog;
15> backup current controlfile;
16> restore validate database;
17> }
18>
19> list backup summary;
20> list backupset;
21> list backup of controlfile;
22> sql 'alter database open';
23>
24> exit;
connected to target database: ORCL (DBID=2284424868)
using target database control file instead of recovery catalog
sql statement: alter session set nls_date_format="DD-MON-YYYY HH24:MI:SS"
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=194 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=193 device type=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\ADMIN\ORCL\BACKUP\B9NO2H27_1_1 RECID=439 STAMP=797000775
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\ADMIN\ORCL\BACKUP\BMNO2M3L_1_1 RECID=452 STAMP=797005941
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=F:\ORACLE\ADMIN\ORCL\BACKUP\BNNO2M3N_1_1 RECID=453 STAMP=797005943
crosschecked backup piece: found to be 'AVAILABLE'
Further on it does the crosscheck then the startup mount then:
tarting backup at 24-OCT-2012 15:41:28
channel c1: starting compressed incremental level 1 datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00002 name=E:\ORADATA\ORCL\SYSAUX.DBF
input datafile file number=00001 name=E:\ORADATA\ORCL\SYSTEM.DBF
input datafile file number=00003 name=E:\ORADATA\ORCL\UNDOTBS1.DBF
input datafile file number=00005 name=E:\ORADATA\ORCL\ECTD_DATA.DBF
input datafile file number=00006 name=E:\ORADATA\ORCL\ECTD_INDEX.DBF
input datafile file number=00004 name=E:\ORADATA\ORCL\USERS.DBF
channel c1: starting piece 1 at 24-OCT-2012 15:41:28
channel c1: finished piece 1 at 24-OCT-2012 15:41:43
piece handle=\\UNCPATH\DATA\ORCL\INCR\D2NOIKD8_1_1 tag=TAG20121024T154128 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:15
Finished backup at 24-OCT-2012 15:41:43
Dave
|
|
|
|
Re: incremental rman backups [message #569383 is a reply to message #569381] |
Thu, 25 October 2012 08:02 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Dave, that works because line 14 of your script includes the keyword INCREMENTAL which was not in your earlier posts.
So are you now happy with the fact that you can do incremental backups without including the archivelogs? As I demonstrated?
|
|
|
|
Re: incremental rman backups [message #569386 is a reply to message #569383] |
Thu, 25 October 2012 08:08 |
dmarcus48
Messages: 44 Registered: May 2008 Location: Central NJ
|
Member |
|
|
The earlier post do have the incremental key work, there's a couple of posts from weds that I typed rather then copy and pasted that don't have it. My mistake, forgive me.
Dave
|
|
|
Re: incremental rman backups [message #569391 is a reply to message #569386] |
Thu, 25 October 2012 09:17 |
dmarcus48
Messages: 44 Registered: May 2008 Location: Central NJ
|
Member |
|
|
I thought I had it, I tried:
backup incremental level 0 cumulative as compressed backupset database;
It works when I run it from an rman session (logging into rman target /), but it doesn't work when I run it in a script.
|
|
|
|
Re: incremental rman backups [message #569401 is a reply to message #569394] |
Thu, 25 October 2012 11:44 |
dmarcus48
Messages: 44 Registered: May 2008 Location: Central NJ
|
Member |
|
|
OK It works!!!!!!!!!!!
This is from the log:
RMAN> connect target *
2> #connect to catalog
3> RUN
4> {
5> sql 'alter session set nls_date_format="DD-MON-YYYY HH24:MI:SS"';
6> crosscheck backup;
7> delete noprompt obsolete;
8> delete noprompt expired backup;
9> delete noprompt expired archivelog all;
10> sql 'alter system archive log current';
11> allocate channel c1 device type disk format 'E:\Oracle\admin\ORCL\backup\%U';
12> backup incremental level 0 cumulative as compressed backupset database;
13> backup current controlfile;
14> restore validate database;
15> }
16>
17> list backup summary;
18> list backupset;
19> list backup of controlfile;
20>
21> exit;
I ran this and it worked!!
Thanks for all your help!!!
Dave
[Updated on: Thu, 25 October 2012 12:22] by Moderator Report message to a moderator
|
|
|
Re: incremental rman backups [message #569403 is a reply to message #569401] |
Thu, 25 October 2012 12:21 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Whoopee!
I'll even add [code] tags to your last post, so that you can see how things should be formatted.
btw, I see that you are in NJ. I've had to make a few trips there in the last year or two, usually Jersey City but a couple of times to other places. I remember having dreadful trouble trying to buy a bottle of beer.
Glad we could help.
|
|
|
Goto Forum:
Current Time: Tue Nov 26 22:14:17 CST 2024
|