Home > AS/400 Tips > iSeries administrator tips > The ins and outs of journaling -- Part III
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES ADMINISTRATOR TIPS

The ins and outs of journaling -- Part III


Ron Turull
03.30.2005
Rating: -4.24- (out of 5)


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


How to use a journal for disaster recovery




Ron Turull

Journals, like mirroring, can be used as protection against loss of data from a disk crash. The trade-off is this: Journaling uses a lot less disk space than mirroring, since it is only protecting files (which is where most of the system activity, i.e. data changes, takes place). However, this is also a disadvantage because, again, only files are protected. In addition, set-up and recovery require a few more manual steps. For maximum protection, use the following steps.

Journal set-up and save process
Every critical file (which is most files) should be journaled. You can journal multiple files to the same journal, but use caution when doing so because this will introduce another level of complexity (or confusion, as the case may be). The following describes the steps required to set up journaling for a single file:

  1. Set up journal(s) as described in Part I and Part II. Put journal and journal receivers in a different ASP than the file they are protecting. If you have never used ASPs before, now is a good time to start. You can keep it simple and just dedicate a small ASP for journaling only. That way you ensure that the file and its associated journal are stored on different disk units. As an added bonus, using a separate ASP for journals will improve performance, compared with putting journals and file in the same ASP.
  2. Save the file each night. You can stretch this out to every other night or once a week, but to keep journal receivers from getting too big, it is best to save the file each night.

  3. Create and attach a new journal receiver. This gives the journal a fresh start the next day.
  4. Save the previous (now detached) journal receiver. This step is optional. It gives you an extra layer of protection. Should anything happen to the file on the saved media, you could reconstruct the file from the previous night's save and the saved journal receiver.
  5. Delete the previous journal receiver. This is the only way to "clear" the entries in the receiver.

More Information

Recovery procedure
After a disk crash or other failure that renders a file unusable, use the following steps to recover that file:

  1. Restore the saved file. Use the most recent save media.
  2. Apply journaled changes to the restored file. Use the Apply Journal Changes (APYJRNCHG) command to perform this step. After completion, the file will be in the same state that it was when the disk crashed. This assumes, of course, that the journal and the journal receiver were stored in a different ASP. Note: The parameter defaults of the APYJRNCHG command are set up for disaster recovery, so you probably won't need to change them.

Restore objects in the correct order
Similar to when you use triggers or referential integrity, when you use journaling and perform a restore you must ensure that certain objects are restored in the proper order so that journaling can be re-established automatically. When you need to restore a file that is journaled, along with its associated objects (i.e., logical files, journal and journal receivers), use the following order:

  • Restore the journal object first (but not the receivers)
  • Restore the physical file or files
  • Restore the any associated logical files
  • Restore the journal receivers

To make things simple, put the journal and receivers in the same library as the files. When configured this way, the system will automatically restore them in the proper order if you restore the entire library (using the RSTLIB command). If they are in different libraries and you do not restore the objects in the above order, you will have to re-establish journaling manually, which may include re-attaching receivers and/or restarting journaling for files.

Note: The restore procedure just discussed is only for when you need to restore a file and its associated journal and receivers. In the recovery procedure discussed earlier, we assumed that the journals and receivers did not have to be restored because they were in another ASP and were not affected by the disk crash.

-----------------------------------
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.


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.


Submit a Tip




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



RELATED CONTENT
iSeries administrator tips
Translating Linux for IBM i admins: Using GUI to make it easy
Translating Linux for IBM i admins: Working with jobs and networking
OpenOffice: What to know before making the transition from Microsoft Office
OpenOffice: An enterprise open source solution
Database performance comparisons on IBM i
Translating Linux for IBM i admins: User profile commands
Modern System i reports using Client Access
Tips for installing Lotus Domino server on a System i partition
The iSeries Blog has a new home on IT Knowledge Exchange
Virtualization for IBM i: Backups

Data backup, storage and retrieval on iSeries
How to migrate old *ALLUSR data using BRMS to V6R1
Authority restrictions on the AUTL on backup/test systems and AUTL on live system
Perform a full system backup without user profile QSECOFR
Faster backup method for System i
Solve problems concerning the ALLOW OBJECT DIFFERENCES parameter when restoring a library
System i backup not advised using network NETBACKUP
How to clear expired BRMS created *SAVF files from System i
Restore a full system backup from the production partition to the test partition
Tivoli Service Manager 6 released with DB2 integration and dedupe
Remove a media with a *PERM expiration date from the inventory
Data backup, storage and retrieval on iSeries Research

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