Skip to main content
SnapManager Oracle

Creating backup schedules


You can schedule a backup to occur at the time and frequency that are suited for your data and environment.

From SnapManager 3.2 for Oracle, you can schedule the backups of the archive log files separately. However, you must use the profile that you created to separate the archive log files.

If you have scheduled the backups of the data files and archive log files at the same time, then SnapManager creates the data files backup first.

If you select the schedule interval as -onetimeonly, then all the pruning options are available. If you select a schedule interval other than -onetimeonly, then the pruning options -until-SCN and -until-date are not supported and the following error message is displayed: The archive log pruning option you have specified, -until-scn or -until-date for the schedule interval hourly is invalid. Specify either the -onetimeonly option for the schedule interval, or prune the archive logs using any one of the option all, or -before {-months | -days | -weeks| -hours}.

When a failover happens in a High Availability Cluster Multiprocessing (HACMP) environment, you must restart the SnapManager for Oracle server so that the service (virtual) address is mapped to the active host and the SnapManager schedules are adjusted to the active SnapManager host. You can add this information in the preprocessing or post-processing HACMP failover scripts.

Note If the same profile and schedule name exists in another repository, the backup scheduling operation is not initiated in that repository. The operation will exit with the following message: operation is already running.
  1. Enter the following command: smo schedule create -profile profile_name {[-full {-online | -offline | -auto}[-retain [-hourly | -daily | -weekly | -monthly | -unlimited] [-verify]] | [-data [-filesfiles [files]] | [-tablespaces-tablespaces [-tablespaces]] {-online | -offline | -auto}[-retain [-hourly | -daily | -weekly | -monthly | -unlimited] [-verify]] | [-archivelogs]} [-commentcomment] [-protect | -protectnow | -noprotect] [-backup-destpath1 [,[path2]] [-exclude-destpath1 [,path2]] [-prunelogs{-all | -untilSCNuntilSCN | -until-dateyyyy-MM-dd HH:mm:ss | -before {-months | -weeks | -days | -hours}} -prune-destprune_dest1,prune_dest2] -schedule-nameschedule_name [-schedule-commentschedule_comment] -interval {-hourly | -daily | -weekly | -monthly | -onetimeonly} -cronstringcronstring-start-time {start-timestart_time <yyyy-MM-dd HH:mm>} -runasuser-runasuser [-force] [-taskspec-taskspec] [-quiet | -verbose]

    If you want to…​ Then…​

    Schedule a backup of an online or offline database

    Specify -offline or -online to schedule a backup of the offline or online database. If you specify these, you cannot use -auto.

    Let SnapManager handle scheduling of a database regardless of whether it is online or offline

    Specify -auto. If you specify -auto, you cannot use --offline or -online.

    Schedule a backup of data files

    Specify -data -files to list the files separated by commas. For example, use file names f1,f2,f3.

    Schedule a partial backup of specific tablespaces

    Specify -tablespaces to list the tablespaces separated by commas. For example, use ts1,ts2,ts3.

    Schedule backup of archive log files

    Specify the following:

    • -archivelogs to schedule backup of the archive log files

    • -backup-dest to schedule archive log file destinations to be included in the backup

    • -exclude-dest to schedule the archive log destinations to be excluded from the backup

    Specify the retention class values

    Specify -retain and indicate whether the backup should be retained according to one of the following retention classes:

    • -hourly

    • -daily

    • -weekly

    • -monthly

    • -unlimited SnapManager defaults to hourly.

    Schedule pruning of archive log files

    Specify the following: -prunelogs to prune the archive log files while scheduling a backup -prune-dest to specify the archive log destination from which the archive log files are pruned

    Include a name for the schedule

    Specify -schedule-name.

    Schedule backup of the database at a specific time interval

    Specify the interval option and select the time interval from the following, by which the backups should be created:

    • -hourly

    • -daily

    • -weekly

    • -monthly

    • -onetimeonly

    Configure a schedule

    Specify -cronstring and include the following seven subexpressions that describe the individual option:

    • 1 refers to seconds.

    • 2 refers to minutes.

    • 3 refers to hours.

    • 4 refers to a day in a month.

    • 5 refers to the month.

    • 6 refers to a day in a week.

    • (Optional) 7 refers to the year. Note: If you scheduled your backup with different times in -cronstring and -start-time, then the schedule of the backup is overwritten and triggered by the -start-time.

    Add a comment about the backup schedule

    Specify -schedule-comment followed by the description string.

    Specify the start time of the schedule operation

    Specify -start-time in the yyyy-mm-dd hh:mm format.

    Change the user of the scheduled backup operation while scheduling the backup

    Specify -runasuser. The operation runs as the user (root user or Oracle user) who created the schedule. However, you can use your own user ID, if you have valid credentials for both the database profile and host.

    Enable a pretask or post-task activity of the backup schedule operation by using the pretask and post-task specification XML file

    Specify the -taskspec option and provide the absolute path of the task specification XML file for performing a preprocessing or a post-processing activity to occur before or after the backup schedule operation.