The smsap backup create command
You can run the backup create command to create database backups on one or more storage systems.
Syntax
|
|
Before you run this command, you must create a database profile by using the profile create command. |
smsap backup create
-profile profile_name
{[-full{-auto | -online | -offline} [-retain {-hourly | -daily | -weekly | -monthly | -unlimited} [-verify] |
[-data [[-files files [files] |
[-tablespaces tablespaces [tablespaces] [-label label] {-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]]
[-taskspec taskspec]
[-dump-force
[-quiet | -verbose]]
Parameters
-
-profile profile_nameSpecifies the name of the profile related to the database you want to back up. The profile contains the identifier of the database and other database information.
-
-autooptionIf 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. -
-onlineoptionSpecifies 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 state, or the primary is mounted and an instance is in the open state. You can use the
-forceoption for online backups if the local instance is in the shutdown state, or no instance is in the open state. 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 the shutdown state and at least one instance is in the open state, you can use the
-forceoption to change the local instance to the mounted state. -
If no instance is in open state, you can use the -force option to change the local instance to open state.
-
-
-offlineoptionSpecifies an offline backup while the database is in the shut down 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. -
-fulloptionBacks 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. -
-dataoptionSpecifies the data files.
-
-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 the 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 the open state, SnapManager verifies that the appropriate tablespaces are in online backup mode.
-
-label labelSpecifies an optional name for this backup. This name must be unique within the profile. The name can contain letters, numbers, underscores (_), and hyphens (-). 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 in single quotation marks (').
Some shells strip the quotation marks off. In this case, you must include the quotation mark with a backslash (\). For example, you might need to enter the following: \' this is a comment\'. -
-verifyoptionVerifies 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. -
-forceoptionForces 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
-forceoption if the local instance is in the shutdown state, or no instance is in the open state.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 the shutdown state and at least one instance is in the open state, then using the
-forceoption changes the local instance to the mounted state. -
If no instance is in the open state, using the
-forceoption changes the local instance to the open state.
-
-
-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.
-
-protect | -noprotect | -protectnowIndicates 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
-protectnowoption 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 the
-retainoption is not specified, the retention class defaults to-hourlyoption. To retain backups forever, use the-unlimitedoption. The-unlimitedoption makes the backup ineligible for deletion by the retention policy. -
-archivelogsoptionCreates archive log backup.
-
-backup-dest path1, [, [path2]]Specifies the archive log destinations to be backed up 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}Deletes 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). -
-prune-dest prune_dest1,prune_dest2Deletes the archive log files from the archive log destinations while creating 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 should be provided while giving the -taskspec option.
-
-dumpoptionCollects the dump files after a successful or failed database backup operation.
Example command
The following command creates a full online backup, creates a backup to secondary storage, and sets the retention policy to daily:
smsap backup create -profile SALES1 -full -online -label full_backup_sales_May -profile SALESDB -force -retain -daily Operation Id [8abc01ec0e79356d010e793581f70001] succeeded.