When Was Your Last SAVSYS, SAVCFG, SAVSECDTA?
Date Posted: June 01, 2011 12:00 AM
Author: Dan Riehl

In a disaster recovery scenario or at a time when we need to reload the system from scratch, it's critical we have all the pieces of the system backed up.

We typically have a pretty good handle on when we last backed up our QSYS-based user libraries, our Document Library objects, and the root '/' file system. But what about the last save of our operating system? And what about our user profiles and security data and our system configuration objects? When was that data last backed up? And what tape or optical volume contains the last backup?

When we save a library using the SAVLIB command, objects are marked with the save date and save device information, as long as we specify UPDHST(*YES). But when we save the operating system, the objects that are saved are not marked with the save information. The same is true when we save user profiles and configuration data. The saved objects are not updated with the last save date.

IBM has supplied some special purpose data areas in the QSYS library that are updated with the save date and save device information when we perform certain save operations.

When we save our security data (including user profiles) using the command Save Security Data (SAVSECDTA), the special data area QSAVUSRPRF in QSYS is updated to reflect the save date and time and save device information.

Below is a list of various SAVE commands and the associated QSYS data area. Upon execution of the command, the data area is updated.

Save Command     Data Area Used                       
SAVCFG		QSAVCFG	
SAVLIB *ALLUSR	QSAVALLUSR	
SAVLIB *IBM	QSAVIBM	
SAVLIB *NONSYS	QSAVLIBALL	
SAVSECDTA	QSAVUSRPRF	
SAVSTG		QSAVSTG	
SAVSYS		QSAVSYS, QSAVUSRPRF, QSAVCFG	
SAVSYSINF 	QSYSINF 	

Viewing the Last Save Date and Device

To view the last save information, you display the object description (DSPOBJD), you don't display the content of the data area. You can start with the command Work with Objects (WRKOBJ), as shown here:

WRKOBJ  OBJ(QSYS/QSAV*)  OBJTYPE(*DTAARA)        

This command allows you to work with all the data areas in the QSYS library that start with the characters QSAV. This results in the following display:

                          Work with Objects                                
                                                                                
 Type options, press Enter.                                                     
   2=Edit authority        3=Copy   4=Delete   5=Display authority   7=Rename   
   8=Display description   13=Change description                                
                                                                                
 Opt  Object      Type      Library     Attribute   Text                        
      QSAVALLUSR  *DTAARA   QSYS                    S/R DIRECTORY INFO FOR SAVE 
      QSAVCFG     *DTAARA   QSYS                    S/R DIRECTORY INFO FOR SAVE 
      QSAVIBM     *DTAARA   QSYS                    S/R DIRECTORY INFO FOR SAVE 
      QSAVLIBALL  *DTAARA   QSYS                    S/R DIRECTORY INFO FOR SAVE 
      QSAVSTG     *DTAARA   QSYS                    S/R DIRECTORY INFO FOR SAVE 
      QSAVSYS     *DTAARA   QSYS                    S/R DIRECTORY INFO FOR SAVE 
 8    QSAVUSRPRF  *DTAARA   QSYS                    S/R DIRECTORY INFO FOR REST 
              

Place option 8 next to one of the data areas. In the example, we chose QSAVUSRPRF to see when we last saved our security data (including user profiles).

Page down to the final page of the display, where the last save information is shown. You can see I last did a SAVSECDTA command on 5/30/11 at 21:20:23. The data from the SAVE operation resides on tape volume W23BK.

                       Display Object Description - Full                        
                                                                 Library 1 of 1 
 Object . . . . . . . :   QSAVUSRPRF      Attribute  . . . . . :                
   Library  . . . . . :     QSYS          Owner  . . . . . . . :   QSYS         
 Library ASP device . :   *SYSBAS         Library ASP group  . :   *SYSBAS      
 Type . . . . . . . . :   *DTAARA         Primary group  . . . :   *NONE        
                                                                                
 Journaling information:                                                        
   Currently journaled  . . . . . . . . :   NO                                  
 Save/Restore information:                                                      
   Save date/time . . . . . . . . . . . :   05/30/11  21:20:23                  
   Restore date/time  . . . . . . . . . :                                       
   Save command . . . . . . . . . . . . :   SAVSECDTA                           
   Device type  . . . . . . . . . . . . :   TAPE                           
   Tape Volume  . . . . . . . . . . . . :   W23BK                      
   Sequence Number  . . . . . . . . . . :   13
     

If you simply want to examine one of the special SAVE data areas, you can use the command DSPOBJD. Here's an example that can be used to display the last time we did a SAVSECDTA:

DSPOBJD OBJ(QSAVUSRPRF) OBJTYPE(*DTAARA)

While We're Here: Where's Your SAVSYS?

While we're here discussing saving the system and its different pieces, check to make sure you're routinely saving your user profiles and system configuration data. Also check to make sure you have a good SAVSYS backup handy if needed. You probably did a SAVSYS operation the last time you made a major change to the operating system, like an OS upgrade, or after applying a cumulative PTF package.

If you don't have these backups (SAVSYS, SAVSECDTA, SAVCFG), plan to get them as soon as you can. You don't want to be stuck in a recovery scenario needing to go back to the original IBM distribution media. That would be a disaster on top of a disaster.


Want to use this article? Click here for options!
Want to subscribe? Click here!
  • Perkolator
    11 months ago
    Jun 03, 2011

    Thanks Dan.

    dschulte, as Dan says on this article, there are dtaaras that don't get updated on global system save commands, but to see what GO SAVE option 21 does, we can look on the QHST log of the date when we launched the command, after the message CPF0994 gets issued (ENDSBS SBS(*ALL)), and you can see all the different saves that get done by the system. Basically:

    -SAVSYS
    -SAV (IBM IFS Directories)
    -SAVLIB *NONSYS
    -SAVDLO
    -SAV User objects

    Anyway, the best reference to know what saves what, is the IBM document:

    Are you Saving the Right Stuff? (G325-6328-03)

    Which can be downloaded (or purchased, as it is a nice-to-have poster) from the URL:

    http://www-05.ibm.com/e-business/linkweb/publications/servlet/pbi.wss?CTY=US&FNC=SRX&PBL=G325-6328-05

    or access the pdf directly

    http://publibfp.dhe.ibm.com/epubs/pdf/32563285.pdf

    And it even includes BRMS commands, a nice poster to have on the wall...

    Regards,

    Carlos Ijalba.

  • driehl@400school.com
    11 months ago
    Jun 02, 2011

    Thank you for your comment.



    You do not need to worry about QSAVSTG, unless you are using the SAVSTG command, which is a save of all your disk, but can only be used to restore All your disk... You cannot restore individual objects or libraries from SAVSTG media... All or nothing.



    As far as the QSAVIBM and the SAVIBM command, Go SAVE option 21 does not perform the command SAVIBM. So the data area is not updated... It does not mean you have not saved the IBM supplied libraries... Option 21 saves those... In fact.. here is what SAVE option 21 does.>/p>



    • SAVSYS

    • SAVLIB LIB(*NONSYS) ACCPTH(*YES)

    • SAVDLO DLO(*ALL) FLR(*ANY)

    • SAV OBJ(('/*') ('/QSYS.LIB' *OMIT) ('/QDLS' *OMIT)) UPDHST(*YES)



    It backs up...




    • IBM Licensed internal code

    • The system library (QSYS)

    • Security objects, including user profiles

    • Device configuration objects

    • All IBM-supplied libraries including those containing user data

    • All user libraries

    • All mail

    • All folders

    • All documents

    • All objects in directories



    Here is a blurb from the IBM 6.1 Info center about the new support in 6.1 for a data area that is updated when you do SAVE option 21.



    "The QSRSAV21 data area in library QUSRSYS contains information about the last five most recent GO SAVE Option 21 (Save Entire System) operations. The information includes the starting date and time of each major step in the save operation, the step identifier, and the device used. The ending date and time of the save operation is identified with asterisks. You can use this information to help you plan how much time to estimate for your next GO SAVE Option 21 operation. "



    This is from http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/topic/rzaiu/rzaiurzaiu264.htm



    Dan Riehl


    www.SecureMyi.com

  • taford@us.ibm.com
    11 months ago
    Jun 02, 2011

    This may not necessarily be true in all cases but is worth checking into. For example, on our V7 system I see that the data areas are updated with other commands. For example:


    Object . . . . . . . : QSAVALLUSR Attribute . . . . . :
    Library . . . . . : QSYS Owner . . . . . . . : QSYS
    Library ASP device . : *SYSBAS Library ASP group . : *SYSBAS
    Type . . . . . . . . : *DTAARA Primary group . . . : *NONE

    Journaling information:
    Currently journaled . . . . . . . . : NO
    Save/Restore information:
    Save date/time . . . . . . . . . . . : 01/28/10 07:01:53
    Restore date/time . . . . . . . . . : 02/24/10 08:15:56
    Save command . . . . . . . . . . . . : SAVOBJ
    Device type . . . . . . . . . . . . : Optical
    Volumes . . . . . . . . . . . . . . : B_GROU
    File label ID . . . . . . . . . . . : /Q5770SS1/Q71000M

  • dschulte
    11 months ago
    Jun 01, 2011

    Thanks for another Interesting article.....I checked the dataareas on my system. The save dates are like this:::



    QSAVALLUSR 06/01/11;
    QSAVCFG 06/01/11;
    QSAVIBM 12/13/07;
    QSAVLIBALL 03/19/11;
    QSAVSTG 12/13/07;
    QSAVSYS 03/19/11;
    QSAVUSRPRF 06/01/11;

    03/19/11 is the date of our last "go save 21". I thought that saved Everything !



    Do the 12/13/07 dates for QSAVIBM and QSAVSTG mean that Go Save 21 does not save everything? Or does it mean that those data area dates don't get updated with a GoSave21?

  • You must log on before posting a comment.

    Are you a new visitor? Register Here
     

    around the forums

    better data access for AS400 applications
    Forum Name: Systems Management
    21 May 2012 06:22 AM | Replies: 0
    Selection error involving field *N.
    Forum Name: SQL, Query and Database
    18 May 2012 02:19 PM | Replies: 6
    WINDOWS 7 with CLIENT ACCESS 7 R1
    Forum Name: Communications/Networking
    18 May 2012 08:43 AM | Replies: 1

    ProVIP Sponsors

    BCD

    Join Our Community!

    Subscribe today to iPro Developer! iPro Developer is packed with technical know-how for developers of IBM i, iSeries, AS400 and System i. Sign up now to get your full subscriber benefits including:

    • Code available for download
    • Full access to the online article archive (including all System iNEWS ProVIP content)
    • Downloadable ebook with past 6 months of articles
    • Discounts on eLearning classes, self-paced training, in-person events, and more!
    iPro Developer Newsletters
    • Get the Latest News
    • Product Updates
    • Helpful Tricks
    • Productivity Tips