Just like a goalie is the last line of defense for a hockey team, a robust backup and recovery strategy provides an IT team with the tools to save the game. An action plan for dealing with disasters is essential for any business. Why? Plain and simple: Downtime equals lost money and decreased productivity. This article profiles most of the AS/400s save and restore commands to give you a basic understanding of when and where to use each command.
Because the AS/400 is an extremely versatile computing system, it provides a vast array of choices for saving and restoring your data. Although the choices seem confusing, I hope this article makes the picture clearer. Also, check out the handy table of these commands (suitable for framingor at least attaching to your computer screen) at www.midrangecomputing.com/mc/99/07. If you need further information on the commands profiled here, visit publib.boulder.ibm.com/pubs/ html/as400/online/v4r1eng.htm and view Backup and Recovery online.
The Key to Making a Save: A Strong Defense
In the IT game, save commands can serve as your best defense, and the AS/400 has a variety of save commands from which to choose.
Save Library (SAVLIB) saves all objects in the library as well as the library description itself and is probably the most widely used AS/400 save command. SAVLIB has the following key parameters:
LIBUse this parameter for the name(s) of the libraries to be saved. Three special values are also available, *NONSYS, *IBM, and *ALLUSR. If you specify *NONSYS, all user-created libraries, licensed program libraries, QGPL, and QUSRSYS are saved. *IBM saves IBM libraries like QHTTP, QJAVA, etc. IBM libraries are defined as any library that contains objects that IBM provides exclusively. QGPL, for example, is not considered an IBM library because objects created locally are sometimes stored there. *ALLUSR saves all libraries except those beginning with a Q or a #.
DEVUse this parameter to specify the name of the device that will perform the save operation, which may be either a storage unit, such as a tape drive, or a save file.
TGTRLSUse this parameter to specify the release level at which you want to save the objects. If you plan to restore the objects on a system that is running on a different release, save the objects at the level of the system on which you will restore them.
SAVACTIf you specify *NO, the object you are saving must not be in use. The following three values allow for the saving of objects while they are in use and determine in which state the objects will be saved. If you specify *LIB, all of the objects in a library reach a checkpoint together and are saved in a consistent state. *SYNCLIB does the same across multiple libraries. Dont use *LIB or *SYNCLIB on libraries that contain thousands of objects. The operation may fail under these conditions. Also, note that *SYNCLIB and *LIB lock all data areas in the libraries that are being saved, which may cause programs that access them to fail. The final option is *SYSDFN. If you use *SYSDFN, objects may not be saved in a consistent state to one another because they may reach checkpoints at different times.
OMITLIB/OMITOBJUse these parameters to omit specific files or libraries from the save operation.
Save Object (SAVOBJ) saves one or more objects on your system. Basically, the same rules apply from the SAVLIB command. The difference between the two commands is that you can use SAVOBJ to save all objects of a specific type. If, for example, you wanted to save all job descriptions on your system, you would use the SAVOBJ command specifying OBJ(*ALL), OBJTYPE(*JOBD).
Save Changed Objects (SAVCHGOBJ) saves only those objects that have changed since the date and time specified on the input parameters. Use the Display Object Description (DSPOBJD) command to find the last save date of an object. (SAVCHGOBJ does not update this timestamp.) This command has its pros and cons. While SAVCHGOBJ can greatly speed up your backup, it can also slow a recovery effort. If, for example, you have to restore an entire library, you may have to use multiple tapes (the last SAVLIB tape and the most recent SAVCHGOBJ tape) in the recovery effort. A key parameter for SAVCHOBJ is REFDATE. The valid values are a date or *SAVLIB. If you enter a date, all objects that have changed after that point are saved. *SAVLIB causes all objects to be saved that have changed since the last time the library they reside in has been saved.
Save File Data (SAVFDTA) saves the contents of a save file to storage media and not the save file itself. An AS/400 save file is similar to a PC zip file. Save files store compressed versions of AS/400 objects and can be restored (unzipped) by using the AS/400 restore commands I discuss later in this article.
Save License Program (SAVLICPGM) distributes licensed programs across multiple systems. You can achieve the same results by using the SAVLIB LIB (*IBM) but with one minor difference. SAVLICPGM allows you to save the code to a save file, which is easier to distribute quickly over a network.
Save Document Library Objects (SAVDLO) saves document library objects stored in the AS/400 Integrated File System (IFS). The IFS stores objects such as email messages, PC files, and the online help text of InfoSeeker. DLO is a key parameter that specifies which document library objects to save. *ALL saves all DLO objects and can be further qualified by using the FLR parameter. *CHG causes all DLO objects that have been changed or created since the last save operation to be saved. Entering a value of *MAIL saves email documents and logs.
Save (SAV) saves a specific object, a directory or subdirectory, an entire file system, or objects that match a specific search criteria. You can use SAV to save objects in the QLANSVR, QNETWARE, and QOPENSYS file systems. If you are using Client Access, SAV needs to be part of your save strategy. Some objects used by Client Access and other client/server applications can be saved only by using the SAV command and therefore would be unrecoverable in the event of a disaster.
Save Storage (SAVSTG) copies all data on your AS/400, including licensed internal code, to storage media and is the fastest way of backing up and restoring an entire
system. You cant restore individual objects with SAVSTG, so use it for disaster recovery only.
Save System (SAVSYS) saves the contents of QSYS as well as the licensed internal code. Use SAVSYS before performing any type of system upgrade.
Save APAR Data (SAVAPARDTA) saves the information required for submitting an Authorized Problem Analysis Report. You can save existing problem information or open a new problem log by specifying PRBID(*NEW). After you enter the problem identifier, a menu appears from which you can select more specific problem information. You can save information such as history logs, system values, and PTF information. SAVAPARDTA also builds an APAR library from the information you select that you can then send to IBM for analysis.
Save Calendar (SAVCAL) allows you to save one or more OfficeVision/400 calendars to a storage medium for backup or migration purposes.
Save Bookshelf (SAVSHF) saves the online documentation for the AS/400 stored in the IFS.
The following six commands are part of AS/400s Object Connect/400 function. They speed up the process of saving objects on one system, transferring them to another, and then restoring them. When provided with the name of a target system and what objects to save/restore, ObjectConnect/400 handles the rest of the process. Each command is closely tied to one of the commands previously outlined.
Save/Restore (SAVRST) saves directory objects on one system, sends them to another, and finally restores them on the target system (correlates to the SAV/RST commands).
Save/Restore Object (SAVRSTOBJ) is the same as SAVRST except you use it for nondirectory objects (correlates with SAVOBJ/RSTOBJ).
Save/Restore Change (SAVRSTCHG) is the same as SAVRST except that it saves changed objects only (correlates with SAVCHOBJ/RSTOBJ).
Save/Restore Library (SAVRSTLIB) supports the same features of the SAVLIB command and works the same way as SAVRST (correlates with SAVLIB/RSTLIB).
Save/Restore Document Library Objects (SAVRSTDLO) processes document library objects (correlates with SAVDLO/RSTDLO).
Save/Restore Configuration (SAVRSTCFG) saves and restores configuration data. It saves objects such as *CFGL, *CNNL, *COSD, *MODD, *NTBD, and *TRA.
Restore: Your Offense
So far, Ive covered only half the story. While a good goalie provides defense, a sound offense is just as important. The way a hockey team scores is by putting the puck in the net, and an IT team scores by providing reliable software and systems. The restore commands provide the means to balance the attack.
Restore (RST) restores objects saved with the SAV command. Restore Authority (RSTAUT) restores object authorities for user profiles. You can run this command on a profile-by-profile basis or for all users.
Restore Calendar (RSTCAL) restores OfficeVision objects saved with the SAVCAL command.
Restore Configuration (RSTCFG) restores configuration objects. You can restore all configuration objects, groups of objects by generic name, or specific types of objects, such as controller descriptions.
Restore Document Library Object (RSTDLO) restores documents, folders, and Restore Libraries (RSTLIB) restores libraries saved with SAVLIB. Restore Licensed Program (RSTLICPGM) restores licensed program information saved via SAVLICPGM.
Restore System Object (RSTOBJ) restores system objects saved with SAVOBJ.
mail.
Restore Bookshelf (RSTSHF) restores objects saved with SAVSHF. Restore User Profiles (RSTUSRPRF) restores user profiles saved with either SAVSYS or SAVSECDTA.
The AS/400 also provides menus for accessing the save and restore commands. By entering GO SAVE on a command line, a menu is produced through which you can access all of the AS/400 save commands. GO RESTORE does the same for the restore commands. The save and restore menus provide a quick and easy way to access the commands in this article.
The 28 commands presented here can be viewed as a team. Some play offense, some play defense, some play special teams, and you are the head coach, responsible for employing your assets in the best way possible to win the game. By combining the various save commands into an effective backup strategy, you can simplify recovery efforts.
Back up all aspects of your system all the time. These commands allow you to back up in the most efficient way possible. For example, unless you upgrade your system on a daily basis, you dont need to back up the licensed internal code every day. For files and objects that do change daily, however, you need to back up often. You need to strike a balance between offense and defense. These commands provide the means to one day hear the words, He shoots; he scores. The IT department wins the game in overtime!
LATEST COMMENTS
MC Press Online