Sample BACKUP SYSTEM control statements

Use sample control statements as models for developing your own BACKUP SYSTEM utility control statements.

Example 1: Creating a full backup of a Db2 subsystem or data sharing group

The following control statement specifies that the BACKUP SYSTEM utility is to create a full backup copy of a Db2® subsystem or data sharing group. The full backup includes copies of both the database copy pool and the log copy pool. In this control statement, the FULL option is not explicitly specified, because it is the default.

//STEP1    EXEC DSNUPROC,TIME=1440,                
//         UTPROC='',                              
//         SYSTEM='DSN'                            
//SYSIN    DD *                                    
  BACKUP  SYSTEM                                   
/*  

Example 2: Creating a data-only backup of a Db2 subsystem or data sharing group

The following control statement specifies that BACKUP SYSTEM is to create a backup copy of only the database copy pool for a Db2 subsystem or data sharing group.

//STEP1    EXEC DSNUPROC,TIME=1440,              
//         UTPROC='',                            
//         SYSTEM='DSN'                          
//SYSIN    DD *                                  
  BACKUP  SYSTEM  DATA ONLY                      
/*                                               

Example 3: Creating a fast replication copy of the database copy pool and dumping the copy to tape

The following control statement specifies that BACKUP SYSTEM is to create a fast replication copy of the database copy pool and initiate a dump to tape of the fast replication copy.

//SYSOPRB JOB (ACCOUNT),'NAME',CLASS=K                      
//UTIL EXEC DSNUPROC,SYSTEM=V91A,UID='TEMB',UTPROC=''       
//*                                                         
//*                                                         
//DSNUPROC.SYSUT1 DD DSN=SYSOPR.SYSUT1,                     
//     DISP=(MOD,DELETE,CATLG),                             
//     SPACE=(16384,(20,20),,,ROUND),                       
//     UNIT=SYSDA                                           
//DSNUPROC.SYSIN    DD  *                                   
   BACKUP  SYSTEM DATA ONLY DUMP                            
/*                                                

Example 4: Creating a fast replication copy of the database copy pool, dumping the copy to tape, and allowing oldest copy to be overwritten

The following control statement specifies that BACKUP SYSTEM is to perform the following actions:

  • Create a fast replication copy of the database copy pool
  • Initiate a dump to tape of the fast replication copy
  • Allow the oldest fast replication copy to be overwritten
//SYSOPRB JOB (ACCOUNT),'NAME',CLASS=K                      
//UTIL EXEC DSNUPROC,SYSTEM=V91A,UID='TEMB',UTPROC=''       
//*                                                         
//*                                                         
//DSNUPROC.SYSUT1 DD DSN=SYSOPR.SYSUT1,                     
//     DISP=(MOD,DELETE,CATLG),                             
//     SPACE=(16384,(20,20),,,ROUND),                       
//     UNIT=SYSDA                                           
//DSNUPROC.SYSIN    DD  *                                   
    BACKUP  SYSTEM DATA ONLY DUMP FORCE                     
/*                                          

Example 5: Dumping an existing fast replication copy to tape

The following control statement specifies that BACKUP SYSTEM is to dump the existing fast replication copy X'E5F9F1C1BD1909683AA8A1A600000E6962DE' to tape, using the DB2STGD2 dump class.

//SYSOPRB JOB (ACCOUNT),'NAME',CLASS=K 
//UTIL EXEC DSNUPROC,SYSTEM=V91A,UID='TEMB',UTPROC='' 
//*       
//*   
//DSNUPROC.SYSUT1 DD DSN=SYSOPR.SYSUT1, 
//     DISP=(MOD,DELETE,CATLG), 
//     SPACE=(16384,(20,20),,,ROUND),  
//     UNIT=SYSDA  
//DSNUPROC.SYSIN    DD  * 
      BACKUP  SYSTEM DATA ONLY DUMPONLY 
        TOKEN (X'E5F9F1C1BD1909683AA8A1A600000E6962DE')
          DUMPCLASS(DB2STGD2) 
/*