Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Online Backup question

Re: Online Backup question

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: 25 Feb 2004 06:20:07 -0800
Message-ID: <14a1f766.0402250620.7a179955@posting.google.com>


"Jan Gelbrich" <j_gelbrich_at_westfalen-blatt.de> wrote in message news:<c1f1g2$1gkuji$1_at_ID-93924.news.uni-berlin.de>...
> Hello,
>
> I would like to hear some opinions about online backup ordering.
> Which "style" is better (safe, fast) ?
>
> This one ?
>
> I.
>
> ALTER TABLESPACE SYSTEM BEGIN BACKUP;
> ALTER TABLESPACE RBS BEGIN BACKUP;
> ALTER TABLESPACE TEMP BEGIN BACKUP;
> ALTER TABLESPACE TOOLS BEGIN BACKUP;
> ALTER TABLESPACE USERS BEGIN BACKUP;
> and so on ...
>
> !cp /u01/oradata/ora8/system01.dbf /var/backup
> !cp /u01/oradata/ora8/system02.dbf /var/backup
> !cp /u01/oradata/ora8/rbs01.dbf /var/backup
> !cp /u01/oradata/ora8/rbs02.dbf /var/backup
> !cp /u01/oradata/ora8/temp01.dbf /var/backup
> !cp /u01/oradata/ora8/tools01.dbf /var/backup
> !cp /u01/oradata/ora8/users01.dbf /var/backup
> and so on ... about 15 more dbfs follow.
>
> ALTER TABLESPACE SYSTEM END BACKUP;
> ALTER TABLESPACE RBS END BACKUP;
> ALTER TABLESPACE TEMP END BACKUP;
> ALTER TABLESPACE TOOLS END BACKUP;
> ALTER TABLESPACE USERS END BACKUP;
> and so on ...

This doesn't even bear thinking about. As you go on to point out yourself, the entire database will be in hot backup mode for a relatively lengthy time, and that means your redo subsystem will be swamped by the 10-30 times increase in redo volume that is engendered by going into hot backup mode in the first place.

> ... or this one ?
>
> II.
>
> --Backup Setting per Tablespace
> ALTER TABLESPACE SYSTEM BEGIN BACKUP;
> !cp /u01/oradata/ora8/system01.dbf /var/backup
> !cp /u01/oradata/ora8/system02.dbf /var/backup
> ALTER TABLESPACE SYSTEM END BACKUP;
>
> ALTER TABLESPACE RBS BEGIN BACKUP;
> !cp /u01/oradata/ora8/rbs01.dbf /var/backup
> !cp /u01/oradata/ora8/rbs02.dbf /var/backup
> ALTER TABLESPACE RBS END BACKUP;
>
> ALTER TABLESPACE TEMP BEGIN BACKUP;
> !cp /u01/oradata/ora8/temp01.dbf /var/backup
> ALTER TABLESPACE TEMP END BACKUP;
>
> ALTER TABLESPACE TOOLS BEGIN BACKUP;
> !cp /u01/oradata/ora8/tools01.dbf /var/backup
> ALTER TABLESPACE TOOLS END BACKUP;
>
> ALTER TABLESPACE USERS BEGIN BACKUP;
> !cp /u01/oradata/ora8/users01.dbf /var/backup
> ALTER TABLESPACE USERS END BACKUP;
>
> and so on BEGIN+cp+END...

This is really the only way to go, because of the redo volumes associated with method 1. The only time method 1 might be a go-er is if you use some sort of mirror-splitting technique, so that the "backup" (ie, the mirror split) takes seconds, not minutes or hours as a regular "cp..." would do.

Your second script misses out a log switch at the end (or an 'archive log current') which is needed if the new backup is not to be rendered invalid by the immediate loss of your current online redo log. I tend not to bother, trusting redo log multiplexing will mean such loss is unlikely to occurr, but you might be more paranoid than me.

You will also find it impossible to put TEMP into hot backup mode if it is a locally managed TEMPFILE tablespace in 8i or 9i. Even if it isn't, I wouldn't bother backing it up because, by definition, there's nothing in there worth recovering.

>
> -----
>
> I am very much in favor of the second style, because
> it minimizes the time that a tablespace is in backup mode.
>
> I would appreciate any comments.
>
> My system: Oracle 8.1.7.3 on AIX 5
> Size of DB ca. 25 GB in total (so it is fairly small)
>
> TIA, Jan

You're on 8.1.7... so skip this sort of script in the first place and learn RMAN. A very nice tool indeed, and saves you all this pain and hassle in the first place. There were some good reasons for not using RMAN in 8.0, but by 8.1.7 those reasons have mostly gone away.

Regards
HJR Received on Wed Feb 25 2004 - 08:20:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US