AIX operating systemsLinux operating systemsWindows operating systems

Postsnapshotcmd

The postsnapshotcmd option allows you to run operating system shell commands or scripts after the Tivoli® Storage Manager client starts a snapshot during a snapshot-based backup operation.

Windows operating systemsThis option can be used in conjunction with the presnapshotcmd option to allow you to quiesce an application while a snapshot is created, and then to restart that application after the snapshot is started. This option is only valid if OFS or online image backup has been configured.

AIX operating systemsAIX® only: This option is only applicable to JFS2 snapshot-based file backup or archive and snapshot-based image backup. For a snapshot-based file backup or archive, use this option with the backup command, the include.fs option, or in the dsm.sys file.

Linux operating systemsLinux only: This option is only valid if the LVM is installed and configured on your system, allowing you to perform a snapshot-based image backup operation.

AIX operating systemsLinux operating systemsAIX and Linux only: For a snapshot-based image backup, use this option with the backup image command, the include.image option, or in the dsm.sys file.

Windows operating systemsFor an online image backup, use this option with the backup image command, the include.image option, or in the dsm.opt file.

Windows operating systemsFor open file support operations, use the postsnapshotcmd option in an include.fs statement or in your client options file (dsm.opt).

If the postsnapshotcmd fails the operation continues, but appropriate warnings are logged.

Windows operating systemsAttention: During image backup operations or snapshot differential backup operations, if the command that you include on either the presnapshotcmd or postsnapshotcmd statement starts an asynchronous process, the command might not complete before the backup operation finishes. If the command does not complete before the backup completes, temporary files might be locked, which prevents them from being deleted. A database event occurs and the following message is recorded in the dsmerror.log file:
ANS0361I DIAG: ..\..\common\db\cacheobj.cpp( 777): dbDelete(): 
 remove('C:\adsm.sys\SystemExcludeCache__24400820.TsmCacheDB'): 
  errno 13: "Permission denied".

The file that is specified in the message (cacheobj.cpp) can be manually deleted after the command that was started by the presnapshotcmd or postsnapshotcmd option completes.

Supported Clients

AIX operating systemsLinux operating systemsThis option is valid for AIX clients and Linux x86_64 clients only. The Tivoli Storage Manager client API does not support this option. The server can also define this option.

Windows operating systemsThis option is valid for all Windows clients. The Tivoli Storage Manager client API does not support this option. The server can also define this option.

Options File

AIX operating systemsLinux operating systemsPlace this option in the dsm.sys file within a server stanza. You can also set this option on the Image-Snapshot tab of the Preferences editor.

Windows operating systemsPlace this option in the client options file (dsm.opt). You can also set this option on the Image-Snapshot tab of the Preferences editor.

Syntax

Read syntax diagramSkip visual syntax diagram
>>---POSTSNAPshotcmd---- --"cmdstring"-------------------------><

Parameters

AIX operating systemsLinux operating systems"cmdstring"
AIX operating systemsLinux operating systemsSpecifies a command to process.

Use the srvprepostsnapdisabled option to prevent the Tivoli Storage Manager server administrator from executing operating system commands on the client system.

If the command string contains blanks, enclose the command string in quotation marks:
   "resume database myDb"
If you placed quotation marks within the command string, then enclose the entire command string in single quotation marks:
   'resume database "myDb"'
Windows operating systems"cmdstring"
Windows operating systemsSpecifies the quiesce command to process.

Use a blank, or null, string for "cmdstring" if you want to prevent any commands from running that the administrator uses for postsnapshotcmd. If you specify a blank or null string, it prevents the administrator from using a command on this option. If your administrator uses a blank or null string on the postsnapshotcmd option, you cannot run a post-snapshot command.

Use the srvprepostsnapdisabled option to prevent the Tivoli Storage Manager server administrator from executing operating system commands on the client system.

If the command string contains blanks, enclose the command string in quotation marks:
   "resume database myDb"
If you placed quotation marks within the command string, then enclose the entire command string in single quotation marks:
   'resume database "myDb"'

Examples

AIX operating systemsLinux operating systemsOptions file:
AIX operating systemsLinux operating systemspostsnapshotcmd "any command"

The command string is a valid command for restarting your application.

Windows operating systemsOptions file:
Windows operating systemspostsnapshotcmd "restart application"

The command string is a valid command for restarting your application.

AIX operating systemsLinux operating systemsCommand line:
AIX operating systemsLinux operating systemsbackup image -postsnapshotcmd="any command"
Windows operating systemsCommand line:
Windows operating systemsbackup image -postsnapshotcmd="restart application"

This option is valid only on the initial command line. It is not valid in interactive mode.