This discussion is archived
5 Replies Latest reply: Jan 7, 2013 5:14 AM by EdStevens RSS

Backup format

971394 Newbie
Currently Being Moderated
Hi all,
I want to backup my database to an dynamic location is which created with the name of system date in windows 7.
But i cant customize the backup database format='d:\dated_folder'.
how to assign the format?

thanks in advance
sarathi
  • 1. Re: Backup format
    Paul M. Oracle ACE
    Currently Being Moderated
    how to assign the format?
    I use this one :
    C:\>set dat=%date:~6,4%%date:~3,2%%date:~0,2%
    
    C:\>echo %dat%
    20130107
    
    C:\>
  • 2. Re: Backup format
    971394 Newbie
    Currently Being Moderated
    yes, i assigned the date like 01072013.
    windows also can able to create folder in date format.
    but i need to store rman backup into this folder,
    for ex:
    rman>backup database format='d:\01072013\%u_bkp';
    i need to automate the backup. so its not possible to assign format day by day in rman script.
  • 3. Re: Backup format
    mseberg Guru
    Currently Being Moderated
    Hello;

    If you use Fast Recovery Area ( no Format ) then Oracle will handle is for you.

    http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmmaint.htm

    You will get a folder with the date under backups in that area.

    Best Regards

    mseberg
  • 4. Re: Backup format
    971394 Newbie
    Currently Being Moderated
    thanks for reply.

    I just used the substitution variable identify the current dated folder.. :-)
    backup database format='d:\backup\%D\dbfull_%u';
    and
    changed windows folder format to 20130107.
    problem solved.
  • 5. Re: Backup format
    EdStevens Guru
    Currently Being Moderated
    jsarathi wrote:
    thanks for reply.

    I just used the substitution variable identify the current dated folder.. :-)
    backup database format='d:\backup\%D\dbfull_%u';
    and
    changed windows folder format to 20130107.
    problem solved.
    Problem solved after having re-invented it.
    As mseberg said, the FRA already does this for you.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points