Skip to main content
SnapManager Oracle

The smo schedule create command

Contributors

You can use the schedule create command to schedule a backup to be created at a specific time.

Syntax

        smo schedule create
-profile profile_name
\[-full\{-auto \| -online \| -offline\}
\[-retain -hourly \| -daily \| -weekly \| -monthly \| -unlimited\]
\[-verify\]\] |
\[-data \[\[-files files \[files\]\] \|
\[-tablespaces tablespaces \[tablespaces\]\] \{-auto \| -online \| -offline\}
\[-retain -hourly \| -daily \| -weekly \| -monthly \| -unlimited\]
\[-verify\]\] |
\[-archivelogs\]}
\[-label label\]
\[-comment comment\]
\[-protect \| -noprotect \| -protectnow\]
\[-backup-dest path1 \[ , path2\]\]
\[-exclude-dest path1 \[ , path2\]\]
\[-prunelogs \{-all \| -until-scn until-scn \| -until -date  yyyy-MM-dd:HH:mm:ss\] \| -before \{-months \| -days \| -weeks \| -hours}}
-prune-dest prune_dest1,\[prune_dest2\]\]
-schedule-name schedule_name
\[-schedule-comment schedule_comment\]
-interval \{-hourly \| -daily \| -weekly \| -monthly \| -onetimeonly\}
-cronstring cron_string
-start-time \{start_time <yyyy-MM-dd HH:mm\>\}
-runasuser runasuser
\[-taskspec taskspec\]
-force
\[-quiet \| -verbose\]

Parameters

  • -profile profile_name

    Specifies the name of the profile related to the database that you want to schedule the backup for. The profile contains the identifier of the database and other database information.

  • -auto option

    If the database is in the mounted or offline state, SnapManager performs an offline backup. If the database is in the open or online state, SnapManager performs an online backup. If you use the -force option with the -offline option, SnapManager forces an offline backup even if the database is currently online.

  • -online option

    Specifies an online database backup.

    You can create an online backup of a Real Application Clusters (RAC) database, as long as the primary is in the open or mounted state and an instance is in the open state. You can use the -force option for online backups if the local instance is in the shutdown state, or no instance is open.

    • If the local instance is in the shutdown state and at least one instance is open, you can use the -force option to change the local instance to mounted.

    • If no instance is in open state, you can use the -force option to change the local instance to open.

  • -offline option

    Specifies an offline backup while the database is in the shutdown state. If the database is in the open or mounted state, the backup fails. If the -force option is used, SnapManager attempts to alter the database state to shut down the database for an offline backup.

  • -full option

    Backs up the entire database. This includes all of the data, archived log, and control files. The archived redo logs and control files are backed up no matter what type of backup you perform. If you want to back up only a portion of the database, use the -files option or -tablespaces option.

  • -files list

    Backs up only the specified data files plus the archived log and control files. Separate the list of file names with spaces. If the database is in open state, SnapManager verifies that the appropriate tablespaces are in online backup mode.

  • -tablespaces tablespaces

    Backs up only the specified database tablespaces plus the archived log and control files. Separate the tablespace names with spaces. If the database is in open state, SnapManager verifies that the appropriate tablespaces are in online backup mode.

  • -label name

    Specifies an optional name for this backup. This name must be unique within the profile. The name can contain letters, numbers, underscore (_), and hyphen (-). It cannot start with a hyphen.

    If you do not specify a label, SnapManager creates a default label in the scope_type_date format:

    • Scope is either F to indicate a full backup or P to indicate a partial backup.

    • Type is C to indicate an offline (cold) backup, H to indicate an online (hot) backup, or A to indicate auto backup, for example, P_A_20081010060037IST.

    • Date is the year, month, day, and time of the backup.

      SnapManager uses a 24-hour clock.

    For example, if you performed a full backup with the database offline on 16th January 2007, at 5:45:16 p.m. Eastern Standard Time, SnapManager would create the label F_C_20070116174516EST.

  • -comment string

    Specifies an optional comment to describe this backup. Enclose the string within single quotation marks (').

    Note Some shells strip quotation marks off. If that is true for your shell, you must include the quotation mark with a backslash (\). For example, you might need to enter: \' this is a comment\'.
  • -verify option

    Verifies that the files in the backup are not corrupt by running the Oracle dbv utility.

    Note If you specify the -verify option, the backup operation is not completed until the verify operation is complete.
  • -force option

    Forces a state change if the database is not in the correct state. For example, SnapManager might change the state of the database from online to offline, based on the type of backup you specify and the state that the database is in.

    With an online RAC database backup, use the -force option if the local instance is in shutdown state, or no instance is open.

    Note The version of Oracle must be 10.2.0.5; otherwise, the database will hang if any instance in the RAC is mounted.
    • If the local instance is in shutdown state and at least one instance is open, you can change the local instance to mounted by using -force option.

    • If no instance is open, you can change the local instance to open by using -force option.

  • -protect | -noprotect | -protectnow

    Indicates whether the backup should be protected to secondary storage. The -noprotect option specifies that the backup should not be protected to secondary storage. Only full backups are protected. If neither option is specified, SnapManager protects the backup as the default if the backup is a full backup and the profile specifies a protection policy. The -protectnow option is applicable only for Data ONTAP operating in 7-Mode. The option specifies that the backup be protected immediately to secondary storage.

  • -retain { -hourly | -daily | -weekly | -monthly | -unlimited}

    Specifies whether the backup should be retained on an hourly, daily, weekly, monthly, or unlimited basis. If -retain option is not specified, the retention class defaults to -hourly. To retain backups forever, use the -unlimited option. The -unlimited option makes the backup ineligible for deletion by the retention policy.

  • -archivelogs

    Specifies creation of an archive log backup.

  • -backup-dest path1, [, [path2]]

    Specifies the archive log destinations for archive log backup.

  • -exclude-dest path1, [, [path2]]

    Specifies the archive log destinations to be excluded from the backup.

  • -prunelogs {-all | -until-scnuntil-scn | -until-dateyyyy-MM-dd:HH:mm:ss | -before {-months | -days | -weeks | -hours}

    Specifies whether to delete the archive log files from the archive log destinations based on options provided while creating a backup. The -all option deletes all of the archive log files from the archive log destinations. The -until-scn option deletes the archive log files until a specified system change number (SCN). The -until-date option deletes the archive log files until the specified time period. The -before option deletes the archive log files before the specified time period (days, months, weeks, hours).

  • -schedule-name schedule_name

    Specifies the name that you provide for the schedule.

  • -schedule-comment schedule_comment

    Specifies an optional comment to describe about scheduling the backup.

  • -interval { -hourly | -daily | -weekly | -monthly | -onetimeonly}

    Specifies the time interval by which the backups are created. You can schedule the backup on an hourly, daily, weekly, monthly, or one time only basis.

  • -cronstring cron_string

    Specifies scheduling the backup using cronstring. Cron expressions are used to configure instances of CronTrigger. Cron expressions are strings that are made up of the following subexpressions:

    • 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.

    • 7 refers to the year (optional).

  • -start-time yyyy-MM-dd HH:mm

    Specifies the start time of the scheduled operation. The schedule start time should be included in the yyyy-MM-dd HH:mm format.

  • -runasuser runasuser

    Specifies changing the user (root user or Oracle user) of the scheduled backup operation while scheduling the backup.

  • -taskspec taskspec

    Specifies the task specification XML file that can be used for preprocessing activity or post-processing activity of the backup operation. The complete path of the XML file must be provided with the -taskspec option.

  • -quiet

    Displays only error messages in the console. The default is to display error and warning messages.

  • -verbose

    Displays error, warning, and informational messages in the console.