![Windows operating systems](ngwin.gif)
![Linux operating systems](nglinux.gif)
![AIX operating systems](ngaix.gif)
Presnapshotcmd
The presnapshotcmd option allows you to run operating system commands before the backup-archive client starts a snapshot.
This allows you to quiesce an application before the client starts the snapshot during a snapshot-based backup or archive.
This option can be used in conjunction with
the postsnapshotcmd 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.
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 presnapshotcmd option
in an include.fs statement or in your client options
file (dsm.opt).
If the presnapshotcmd fails it is assumed that the application is not in a consistent state and the client stops the operation and display the appropriate error message.
![Windows operating systems](ngwin.gif)
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 JFS2 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 set also this option on the Image-Snapshot tab of
the Preferences editor.
Place this option
in the client options file (dsm.opt). You can set also 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 running 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:"quiesce 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 presnapshotcmd. 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 presnapshotcmd option, you cannot run a pre-snapshot command.
Use the srvprepostsnapdisabled option to prevent the IBM Spectrum Protect server administrator from running 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:"quiesce database myDb"
'resume database "myDb"'
Examples
Options file:
presnapshotcmd "any shell command or script"
Options file:
presnapshotcmd "<insert your application quiesce command here>
application"The command string is a valid command for quiescing your application.
Command line:
backup image -presnapshotcmd="any shell command or script"
Command line:
backup image -presnapshotcmd="<insert your application quiesce command here> application"
This option is valid only on the initial command line. It is not valid in interactive mode.