A snapshot backup operation uses the fast copying technology of a storage device to perform the data copying portion of the backup.
Before you can perform a snapshot backup, you must enable DB2 Advanced Copy Services (ACS). See: Enabling DB2 Advanced Copy Services (ACS).
BACKUP DATABASE command:
db2 backup db sample use snapshot
ADMIN_CMD procedure with BACKUP DATABASE parameter:
CALL SYSPROC.ADMIN_CMD
('backup db sample use snapshot')
db2Backup API
int sampleBackupFunction( char dbAlias[],
char user[],
char pswd[],
char workingPath[] )
{
db2MediaListStruct mediaListStruct = { 0 };
mediaListStruct.locations = &workingPath;
mediaListStruct.numLocations = 1;
mediaListStruct.locationType = SQLU_SNAPSHOT_MEDIA;
db2BackupStruct backupStruct = { 0 };
backupStruct.piDBAlias = dbAlias;
backupStruct.piUsername = user;
backupStruct.piPassword = pswd;
backupStruct.piVendorOptions = NULL;
backupStruct.piMediaList = &mediaListStruct;
db2Backup(db2Version950, &backupStruct, &sqlca);
return 0;
}