The smsap schedule create command
You can use the schedule create command to schedule a backup to be created at a specific time.
Syntax
smsap 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]
[-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_nameSpecifies 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 optionIf 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
-forceoption with the-offlineoption, SnapManager forces an offline backup even if the database is currently online. -
-online optionSpecifies an online database backup.
-
-offline optionSpecifies 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
-forceoption is used, SnapManager attempts to alter the database state to shut down the database for an offline backup. -
-full optionBacks 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
-filesoption or-tablespacesoption. -
-files listBacks 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 tablespacesBacks 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 nameSpecifies 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 stringSpecifies an optional comment to describe this backup. Enclose the string within single quotation marks (').
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 optionVerifies that the files in the backup are not corrupt by running the Oracle dbv utility.
If you specify the -verifyoption, the backup operation is not completed until the verify operation is complete. -
-force optionForces 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.
-
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
-forceoption. -
If no instance is open, you can change the local instance to open by using
-forceoption.
-
-
-retain { -hourly | -daily | -weekly | -monthly | -unlimited}Specifies whether the backup should be retained on an hourly, daily, weekly, monthly, or unlimited basis. If
-retainoption is not specified, the retention class defaults to-hourly. To retain backups forever, use the-unlimitedoption. The-unlimitedoption makes the backup ineligible for deletion by the retention policy. -
-archivelogsSpecifies 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-date yyyy-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
-alloption deletes all of the archive log files from the archive log destinations. The-until-scnoption deletes the archive log files until a specified system change number (SCN). The-until-dateoption deletes the archive log files until the specified time period. The-beforeoption deletes the archive log files before the specified time period (days, months, weeks, hours). -
-schedule-name schedule_nameSpecifies the name that you provide for the schedule.
-
-schedule-comment schedule_commentSpecifies 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_stringSpecifies 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:mmSpecifies the start time of the scheduled operation. The schedule start time should be included in the yyyy-MM-dd HH:mm format.
-
-runasuser runasuserSpecifies changing the user (root user or Oracle user) of the scheduled backup operation while scheduling the backup.
-
-taskspec taskspecSpecifies 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
-taskspecoption. -
-quietDisplays only error messages in the console. The default is to display error and warning messages.
-
-verboseDisplays error, warning, and informational messages in the console.