• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Restore a Single IFS Directory

    July 26, 2002 Timothy Prickett Morgan

    Hey, Joe:

    I backed up my entire Integrated File System (IFS) using option 21 (Entire System) from the GO SAVE menu. Now I want to restore just one IFS directory called /test1, not the entire IFS.

    How do I do it?

    — Alex

    The answer here is to use OS/400’s Restore (RST) command. This is a fairly easy command to run, but there are one or two quirks to watch out for as you do it. Here’s my drill for restoring a single directory to the IFS.

    First, put the tape (or tapes) from the full system backup containing the IFS into your tape drive. This can get a little tricky because RST may be looking only for those tapes that contain your IFS data, and it may issue an error if you just put in the first tape in your option 21 backup set that doesn’t contain your IFS data (the first tape generally contains the SAVSYS data as well as some IBM and user library backups and, possibly, your DLO files). To locate the proper IFS tapes to put in your tape drive, use the Display Tape (DSPTAP) command to look for the first tape in the backup set that contains a label called SAVyyyymmdd where yyyy=the year the backup set was created, mm=the month the set was created, and dd=the day of the month the set was created, as per my example:

    DSPTAP DEV(TAP01) DATA(*LABELS) OUTPUT(*PRINT)
    

    Put that tape in slot one of the drive, and then insert the remainder of the tapes from the backup set that were created after that tape into slot two and above.

    Let’s assume that your OS/400 tape drive name is TAP01. To restore this directory, type in the following RST command:

    RST  DEV('QSYS.LIB/TAP01.DEVD') +
       OBJ(('/test1*' *INCLUDE)) +
       SUBTREE(*ALL) +
       ALWOBJDIF(*ALL)
    

    This RST statement tells OS/400 to restore all files and directories that match the /test1* pattern, which is a wildcard designation. The SUBTREE(*ALL) parameter tells OS/400 to also restore all the files and subdirectories contained under /test1. Note that there are different values for SUBTREE that allow you to specify whether or not you also want to restore the subdirectories contained under /test1. To restore just the /test1 directory without restoring any of its subdirectories, try coding SUBTREE(*NONE). To restore just the subdirectory structure under /test1 without restoring the files that exist in those subdirectories, try coding SUBTREE(*DIR).

    If you’re not using TAP01, substitute the name of your tape drive for TAP01. Because you’re dealing with the IFS and your tape drive description exists in the DB2 UDB library, which is contained in the QSYS.LIB file system, the notation for specifying the tape drive’s location must be listed in IFS format. This accounts for the QSYS.LIB/TAP01.DEVD coding.

    Be careful with this command, because it will restore everything in that IFS directory with whatever you backed up from the tape, clobbering any changes you may have made to existing /test1 files since the backup. My general rule is that you should always walk on tiptoes when restoring directories and double-check everything before you press the Enter key. If you want to be more cautious, restore /test1 to a different IFS directory.

    If you want to restore /test1 to a different IFS directory, say one called /restores off the IFS root (/), you could try coding the statement with the optional new object name (sometimes called pathname) part of the OBJ parameter, as follows:

    RST DEV('QSYS.LIB/TAP01.DEVD') +
       OBJ(('/test1*' *INCLUDE '/restores*')) +
       SUBTREE(*ALL) ALWOBJDIF(*ALL)
    

    When the new object name is left off this command (as in the first example), OS/400 defaults to restoring directly back to the directory name that was backed up. If you’re restoring to a different directory, however, I recommend that you create your target directory in the IFS before you proceed. OS/400 might create it for you if you neglect to do so, but I always like to be as specific as possible in restore operations. Here’s the statement to create a new IFS directory called /restores off the root of the IFS:

    CRTDIR DIR('/restores')
    

    Once the directory is created and you restore your files, then you can pick and choose which files to transfer from /restores back to /test1. File transfer can be done either through green-screen commands or through iSeries Operations Navigator (OpsNav).

    I’m partial to restoring files and directories to hold directories rather than directly to the originating location, because it gives me a chance to look at the files before I move them to their final destination.

    Hope this helps.

    — Joe

    Sponsored By
    ADVANCED SYSTEMS CONCEPTS

    SEQUEL meets all your iSeries and AS/400 data access needs in a single, integrated solution:

    • Windows, Web or host user interfaces

    • Convert AS/400 data into PC file formats

    • E-mail or FTP query results, reports and spool files
    • Run-time prompted queries and reports for end users

    • IF-THEN-ELSE logic in queries and reports

    • Report, form and label formatting second to none

    • Easily convert date fields, character-to-numeric, numeric-to-character and other data manipulation

    • SORT or JOIN using a calculated field

    • Quick summarization of data with Tabling function

    • Run multiple SEQUEL requests as one with the SEQUEL Scripting function

    • OLAP Business Intelligence at a fraction of the cost of comparable solutions

    Take 6 minutes to view a SEQUEL ViewPoint ScreenCam movie to see how simple Windows-based AS/400 and iSeries data access can be! In just a few short minutes, you can find out ways to make your job easier and improve data access throughout your organization. Download the ViewPoint movie here .

    For more information or a FREE trial of SEQUEL, call 847/605-1311 or visit Advanced Systems Concepts.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: mgo_rc, Volume 2, Number 56 -- July 26, 2002

    Sponsored by
    PERFSCAN

    Revolutionary Performance Management Software

    At Greymine, we recognize there is a void in the IT world for a dedicated performance management company and also for a performance management tool that’s modern, easy to use, and doesn’t cost an arm and a leg. That’s why we created PERFSCAN.

    PERFSCAN is designed to make your job easier. With revolutionary technology, an easy-to-read report and graphics engine, and real time monitoring, tasks that used to take days can now take minutes. This means you will know your system better and will be able to provide better service to your customers.

    OUR FEATURES

    PERFSCAN is full of robust features that don’t require you to take a three-day class in order to use the product effectively.

    Customizable Performance Reporting

    Whether you are troubleshooting a major system problem or simply creating a monthly report, PERFSCAN lets you select any combination of desired performance metrics (CPU, Disk, and Memory).

    User Defined Performance Guidelines

    No matter if you are a managed service provider managing complex systems in the cloud or a customer analyzing your on-premises solution, PERFSCAN gives you the flexibility to define all mission critical guidelines how they need to be.

    Understanding The Impact Of Change

    Tired of all the finger pointing when performance is suffering? PERFSCAN’s innovative What’s Changed and Period vs. Period analysis creates a culture of proof by correlating known environmental changes with system performance metrics.

    Comprehensive Executive Summary

    Creating performance graphs is easy. Understanding what they mean is another thing. With one mouse click, PERFSCAN includes an easy-to-understand executive summary for each core metric analyzed.

    Combined Real-Time Monitor And Performance Analysis Tool

    With PERFSCAN’s combined built in enterprise real-time monitor and historical performance analysis capability, you will always know how your mission-critical systems are performing.

    Cloud Performance Reporting Is Easy

    Managing performance for production systems in the cloud can be a black hole to many system administrators. The good news is PERFSCAN analyzes all core metrics regardless of the location. That’s why MSPs and customers love PERFSCAN.

    Detailed Job Analysis

    PERFSCAN shows detailed top job analysis for any desired period. All metrics are displayed in two ways: Traditional Report and Percentage Breakdown Pie Chart. This toggle capability instantly shows the jobs using the most system resources.

    Save Report Capability

    Your boss lost the report you gave to him on Friday. Now what do you do? With PERFSCAN’s save report capability, any report can be retrieved in a matter of seconds.

    Professional PDF Reporting With Branding

    Creating professional looking reports for your customers has never been easier with PERFSCAN. Branding for our partners and service provider customers is easy with PERFSCAN.

    Check it out at perfscan.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Did OPNQRYF Retrieve Records? Retrieving Query Definitions

    Leave a Reply Cancel reply

MGO Volume: 2 Issue: 56

This Issue Sponsored By

    Table of Contents

    • Generating a Unique Identifier
    • Restore a Single IFS Directory
    • Sending Escape Messages from RPG

    Content archive

    • The Four Hundred
    • Four Hundred Stuff
    • Four Hundred Guru

    Recent Posts

    • Fortra Issues 20th State of IBM i Security Report
    • FNTS Launches Managed Services for Power Servers in IBM Cloud
    • Total LTO Shipped Capacity Up Slightly in 2022
    • Four Hundred Monitor, May 24
    • Update On Critical Security Vulnerability In PowerVM
    • Critical Security Vulnerability In PowerVM Hypervisor
    • IBM Power: Hosted On-Premises Or In The Cloud?
    • Guru: Watch Out For This Pitfall When Working With Integer Columns
    • As I See It: Bob-the-Bot
    • IBM i PTF Guide, Volume 25, Number 21

    Subscribe

    To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

    Pages

    • About Us
    • Contact
    • Contributors
    • Four Hundred Monitor
    • IBM i PTF Guide
    • Media Kit
    • Subscribe

    Search

    Copyright © 2023 IT Jungle