Home > AS/400 Tips > iSeries administrator tips > Want to speed up your nightly backups? Use save files
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES ADMINISTRATOR TIPS

Want to speed up your nightly backups? Use save files


Ron Turull
03.31.2004
Rating: -4.43- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


You Can View User Feedback To This Tip

If you are looking for a way to speed up your nightly backup chores, try using the save file solution. Backing up your system to a save file can be a real time-saver and, best of all, it's simple.

Why save files reduce save times

A save file is a special type of file that can store the results of a save operation. A save file works just like a tape device, but it's a file stored on you system's DASD. And that is precisely why it is faster.

Since you are saving the objects to a file, the save operation is much faster. Writing data to DASD is thousands of times faster than writing data to tape. This translates into less downtime while you save your system.

And, of course, you can also restore the objects that are saved in a save file.


Ron Turull

Use the SAVSAVFDTA command to save the contents of a save file
After you have finished saving your system, you can bring it back online. Then later -- perhaps during the next day -- you can save the contents of the save file to a tape for off-system storage. That can be done while the system is up and while users are working.

You use the Save Save File Data (SAVSAVFDTA) command to save the contents of a save file to tape in a format that allows you to do a direct restore from tape. That is, after using the SAVSAVFDTA command, the contents of the tape will be as if you had saved the library/objects directly to the tape. So, you can do a RSTLIB of RSTOBJ command, for example, directly from the tape instead of having to go back through a save file (which you can also do if you want/can).

Restriction: Only one library can be saved at a time
The only real restriction when using save files is that you can save only one library to a save file. That isn't too bad if you need to save only a few production libraries. But for installations that have many libraries to save or want to save all libraries, it can be a hassle. In those instances, you will definitely want to automate the process.

More Information

I have put together a utility you can use to save all your user libraries to save files. (You can easily modify the utility to save other libraries or objects). Then the utility spawns off another program to save the save files to tape. (You can use the SCDDATE and SCDTIME parameters on the SBMJOB command to schedule the job for some other time. Remember, it will be saving the save files so it can be done at anytime.)

The two programs I've written are SAVELIBS1 and SAVELIBS2. SAVELIBS1 saves each user library to its own save file in library SAVLIB, which it creates if needed. The only parameter to this program is the name of the tape device to which the save files will ultimately be saved. SAVELIBS2 saves the contents of all the save files in library SAVLIB to the device name you passed to the first program.

How the utility works
The utility starts off by creating a library called SAVLIB. This is its work library and where the save files will be stored. Then it lists the names of all the libraries on your system to an outfile. After putting the system in a restricted state, the program loops through the list of libraries, and for each of the user libraries (except SAVLIB and QTEMP) it does the following:

  1. Creates a save file with the same name as the library (if necessary)
  2. Saves the library to the save file.

The program wraps up by restarting the system and then it submits the other program, which will save the save files (or, more precisely, will save the data in the save files) to tape.

Make sure you have enough DASD
Remember, you are saving the libraries to DASD, so you will need -- at least temporarily -- enough DASD to store the saved data. To help alleviate the DASD requirements, the utility described above takes advantage of the data compression option on the SAVLIB command. The compression algorithm used is a repeating character algorithm where repeating characters -- such as a bunch of blanks at the end of a name field in a file -- are replaced by the number of times the character repeats.

This compression algorithm is not the best by a long shot, but it is very fast. Plus, for a typical iSeries, where the database is a large part of the system, this compression algorithm is fairly effective. Look for compressed sizes in the range of 50% to 65% of the original size.

Remember your occasional total system save
The Save System (SAVSYS) command is the only way to save the Licensed Internal Code (LIC) and the QSYS library in a format compatible with the installation of the AS/400-iSeries system. However, the SAVSYS command does not support save files. So, remember to run it every week or so to ensure you have the proper backup.

The SAVSYS command also saves configuration objects (e.g., device descriptions) and security data (e.g., user profiles), which can also be done independently using the Save Configuration (SAVCFG) command and the Save Security Data (SAVSECDTA) command, respectively. Note, the SAVCFG and SAVSECDTA commands both support save files.

-----------------------------------
About the author: Ron Turull is editor of Inside Version 5. He has more than 20 years' experience programming for and managing AS/400-iSeries systems.

USER FEEDBACK TO THIS TIP

  • I just read the Administrator tip "Want to speed up your nightly backups? Use save files" by Ron Turull and thought that it might have been written five years ago. Current tape drive and I/O speeds are much faster than they used to be. It is my understanding that after disk arm contention is taken into consideration that a save to SAVF can now actually be slower than a save to tape in many cases. If you really want to cut your backup window, Save-While-Active has got to be the best trick out there.
    -- Scott Ingvaldson AS/400 system administrator, GuideOne Insurance Group


  • The author responds:
    I agree with the reader that tape drive speeds have increased and the save-while-active option is a very good option; however, it doesn't work for everyone and not everyone has the newer tape drives.
    -- Ron Turull


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
OS/400
Top 10 backup commands
Take control of your iSeries
How to save time using the CPYTOPCD and CPYFRMPCD commands
Top Q&A's on the OS/400
Top 10 security tips
Use caution when providing access to file shares
How to set up an autostart job
How does Sarbanes-Oxley affect you?
Automated disaster recovery revisited
Top 10 Administrator Tips

Systems Management
Can you trust all those trigger programs?
Are your backups complete?
Controlling remote command processing
Watch your profiles
Avoid locking issues
Send message to users at a remote site
Security journal receiver management
Top 10 backup commands
Tracking critical file access in real time
Create an iSeries Access image and update it with the latest Service Pack

Backup and Recovery
Backup and recovery advice from the pros
Store system info with backups
30 backup/recovery tips in 30 minutes
Maximum uptime: HA solutions for the iSeries
Don't be caught without a disaster recovery plan
Tips for successful disaster recovery

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts