Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Backup filenames - need help

Posted on 2013-01-22
11
Medium Priority
?
426 Views
Last Modified: 2013-01-22
Is there a way to tell what type of backup it is by just the file name?

I have a directory where all my backup files are and I don't kow which ones to use for restore since I know some are full backups, some incremental level 0, and some differential level 1 backups. Is there a way to tell?

Here are some examples:

 
-rw-r-----    1 oracle   dba       297289216 Jan 18 13:59 o1_mf_annnn_TAG20130118T135917_8hm6w5tb_.bkp
-rw-r-----    1 oracle   dba       712884224 Jan 18 13:59 o1_mf_nnndf_TAG20130118T135920_8hm6w93h_.bkp
-rw-r-----    1 oracle   dba         7798784 Jan 18 13:59 o1_mf_ncsnf_TAG20130118T135920_8hm6wk9l_.bkp
-rw-r-----    1 oracle   dba            3072 Jan 18 13:59 o1_mf_annnn_TAG20130118T135930_8hm6wlhl_.bkp
-rw-r-----    1 oracle   dba       713162752 Jan 18 14:14 o1_mf_nnnd0_TAG20130118T141414_8hm7r70g_.bkp
-rw-r-----    1 oracle   dba         7798784 Jan 18 14:14 o1_mf_ncsn0_TAG20130118T141414_8hm7rh65_.bkp
-rw-r-----    1 oracle   dba       144826368 Jan 22 10:41 o1_mf_nnnd1_TAG20130122T104113_8hxdrsp8_.bkp
-rw-r-----    1 oracle   dba         7798784 Jan 22 10:41 o1_mf_ncsn1_TAG20130122T104113_8hxds1t9_.bkp

Open in new window

0
Comment
Question by:YZlat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38806086
For can control some aspects of the file names generated.

check the docs:
http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsubcl010.htm#RCMRF195

You will need to check your backup script to see what variables you are currently setting.
0
 
LVL 35

Author Comment

by:YZlat
ID: 38806091
for backup I used RMAN commands

BACKUP INCREMENTAL LEVEL 0 DATABASE;

and

BACKUP INCREMENTAL LEVEL 1 DATABASE;

that's all
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38806122
I'm not sure what the 'default' format is.  The doc link I provided should tell you this.

If you want anything other than the default, you will have to specify the format.

You should be able to use a REPORT or LIST rman command that will tell you what file is part of what backup.

Report link:
http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta2006.htm#i84684

List link:
http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta027.htm#i82460
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
LVL 35

Author Comment

by:YZlat
ID: 38806274
I looked over the document you have provided but still can't figure out how to figure out backup type from the filename created by default. COuld you please break it down for me?
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38806310
In the doc link it states the 'default' naming:
%U    Specifies a system-generated unique file name (default).

From my scan of that doc, it doesn't look like you can tell from the file name itself.  I also didn't see where it has a varialbe that does.

You might need to set up individual tags for the different types of backups to get this as part of the file names.

Otherwise the list or report commands should have them.
0
 
LVL 35

Author Comment

by:YZlat
ID: 38806533
how do you usually specify the backup filename from your BACKUP command?

And do you just run a command from the command line or do you have a separate backup script?
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38806555
You should create an RMAN script to handle your backups.

The BACKUP command accepts a format parameter:
http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmbckba.htm#CEGBCICH
0
 
LVL 35

Author Comment

by:YZlat
ID: 38806712
could you give me an example of an RMAN script? I am new to all this
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 38806811
Sorry but no.  The script will need to represent your specific backup requirements.  What works for one database will likley not work for another.  Therefore, no two scripts will likely be alike.

There are a ton of examples out there on rman scripts that show different ways of doing things.  Once you have decided on a backup and recovery strategy that works for your requirements, it is just coming up with the commands and placing them in a file.

An example requirement that you need to decide on:  For your incrementals, will you be using block change tracking?

I can say that I've chosen to use a rolling incremantal method.  This takes the last incremental backup and rolls it into the full (level 0).  Then I only ever need to recover one full and possible one incremental no matter what day the crash happens on.

The docs talk aobut this.
0
 
LVL 35

Author Comment

by:YZlat
ID: 38806829
So I tried specifying the TAG in order to recognize better my backups, and I tried usingg incremental backup, level 0 and level 1 differential.

I ran:

BACKUP INCREMENTAL LEVEL 0 TAG 'inc_level_0_' DATABASE;

but then when I ran


BACKUP INCREMENTAL LEVEL 1 TAG 'inc_level_1_diff_' DATABASE;

I kept getting an error on the word database. It only worked when I specified the same tag as for the level 0 backup:

BACKUP INCREMENTAL LEVEL 1 TAG 'inc_level_0_' DATABASE;

Why is that? And how, in this case, can I tell apart level 0 and level 1 backups?
0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1000 total points
ID: 38806864
TAG's was just a thought.  You may not be able to use them to distinquish the different levels.

You will just need to read about them and play a little.  I don't have the requirement to tell the difference between a full and incremental in my files so I've never tried.

>>Why is that?

Not sure.  I can only go by what the docs tell me:

http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmbckba.htm#CEGGGDIJ

In practice, tags are often used to distinguish a series of backups created as part of a single strategy, such as an incremental backup strategy. For example, you might create a weekly incremental backups with a tag like BACKUP TAG weekly_incremental. Many forms of the BACKUP command let you associate a tag with a backup, and many RESTORE and RECOVER commands let you specify a tag to restrict which backups to use in the RESTORE or RECOVER operation.

>>And how, in this case, can I tell apart level 0 and level 1 backups?

I don't know that you can tell from this.  It may require a LIST or REPORT from RMan.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question