

Postsnapshotcmd
The postsnapshotcmd option allows you to run operating system shell commands or scripts after the backup-archive client starts a snapshot during a snapshot-based backup operation.
This 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® 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® 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 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.
For an online image backup, use this option
with the backup image command, the include.image option, or in the dsm.opt file.
For 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.
Attention: 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

This option is valid for AIX clients
and Linux x86_64 clients only. The IBM Spectrum® Protect API does not support this option. The server
can also define this option.
This option is valid for all Windows clients. The IBM Spectrum Protect API does
not support this option. The server can also define this option.
Options File

Place this option in the client
system-options file (dsm.sys) within a server stanza. You can also set this option on the Image-Snapshot tab of the Preferences editor.
Place 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
Parameters

"cmdstring"
Specifies a command to process. Use the srvprepostsnapdisabled option to prevent the IBM Spectrum Protect server administrator from executing operating system commands on the client system.
If the command string contains blanks, enclose the command string in quotation marks:
If you placed quotation marks within the command string, then enclose the entire command string in single quotation marks:"resume database myDb"'resume database "myDb"'
"cmdstring"
Specifies 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 IBM Spectrum Protect server administrator from executing operating system commands on the client system.
If the command string contains blanks, enclose the command string in quotation marks:
If you placed quotation marks within the command string, then enclose the entire command string in single quotation marks:"resume database myDb"'resume database "myDb"'
Examples

Options file:

postsnapshotcmd "any command"The command string is a valid command for restarting your application.
Options file:
postsnapshotcmd "restart application"The command string is a valid command for restarting your application.

Command line:

backup image -postsnapshotcmd="any command"
Command line:
backup image -postsnapshotcmd="restart application"
This option is valid only on the initial command line. It is not valid in interactive mode.
