Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Automated AS400 Backup Procedure

Posted on 2012-04-10
Medium Priority
Last Modified: 2012-05-08
Presently, the process to backup our AS400 requires several steps. User must log on to pc console. User must start operations console if it is not already running.  User must open session. User must initialize tape. Then user runs OPTION 21 (save entire system) from the SAVE MENU. I would like to automate this. Has anyone else done this? If so, do you have a procedure I could use as a starting point?
Job should be scheduled
Job should start when system is IPL'd or restarted
Job should initialize tape
Job should save files
Jobe should send msg to specified operator

Question by:rodneygray
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2

Expert Comment

ID: 37831060
Is this just an every day backup or do you really need the system backup?

If you are preforming a system backup, keep doing the 21.  You don't want to have to explain to the boss that you lost the system because you wanted to save a few minutes.

If it is for daily saves, you can create a CL that will end QINTER and QBATCH to remove locks and the do a SAVLIB of *ALLUSR.  you will end up omitting some IBM libs.

Answer the questions above and I may have a suggestion.

LVL 16

Expert Comment

by:theo kouwenhoven
ID: 37831515
Hi  rodneygray,

Did you ever looked to the standard iSeries backup tool? and all options you can use there (e.g. Init before save etc)

Gust type GO BACKUP on a command line.

LVL 27

Expert Comment

ID: 37835615
You can setup and run "full system saves" without having someone available, but it's not trivial to do.

The major reason comes down to the fact that there is rarely a need to do a "full system save" except under special circumstances. Circumstances might be just before doing an operating system upgrade or to prepare for migration to a new system. It can also be useful just before applying a significant cume PTF package.

The difficulty of "full system save" is that it means saving elements of the system that are actively being used by the save operation while the save is executing (e.g., the operating system itself). It's not trivial trying save stuff that is actively in use. Further, if you save the operating system once, there's not much point in saving it again the next day.

So, the parts of "full system save" the require the special handling are commonly saved once. (They might be saved twice, just to have a backup copy stashed somewhere else.)

The rest of the stuff on your system can be saved daily much easier. That's the stuff that you'd be changing with your applications -- records in files, streamfiles, etc. All of that can be scheduled without much problem.

Note that the GO BACKUP menu, and its SETUPBCKUP sub-menu, doesn't even make the QSYS library available for selection.

A "full system save" takes some work if you really want it done automatically on a schedule. If you can justify saving the parts (i.e., library QSYS and some IBM product libraries), we can explore options. Just be aware that it's not going to happen soon.

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.


Author Comment

ID: 37835674
I am open to performing a full system save on a monthly basis and just saving user libraries and files on a daily basis.

Expert Comment

ID: 37835963
You should take Tom's advise first.  See if that works for you.  If not, you could write your own CL to handle any special problems you may have.

LVL 16

Expert Comment

by:theo kouwenhoven
ID: 37836054
Full, monthly, weekley, daily, or once, it all can be done by the standard iSeries backup tool :-)
LVL 27

Assisted Solution

tliotta earned 1000 total points
ID: 37839324
The GO BACKUP menu can guide you through setting up a schedule for user libraries/objects. Review the menu options, starting with option 10, Set up backup. Then, on the SETUPBCKUP menu, review options that define what to back up and when.

After review, see how many questions remain and ask them here.

@Murph -- Unless you're referring to the BRMS product, I don't know of any way to do a "full" backup through the BACKUP menu. You can indeed request *ALL libraries, but it only covers all "user" libraries (libraries with user related data objects) up to i 7.1 at least. It doesn't include QSYS, QDEVTOOLS and many others. If you know how to get others, it will be a useful addition to this question.

LVL 35

Accepted Solution

Gary Patterson earned 1000 total points
ID: 37874312
Unattended backups from "GO BACKUP" menu

We may just have a difference of opinion about the term "unattended".  

You can start an unattended backup from the console using option 20 to set backup options including a start time, and then hitting option 21.  The console will lock up until the time you defined in option 20.  Then the following sequence is executed:

STRSBS SBSD(controlling-subsystem)

Bear in mind you will have to initiate option 21 manually each day, but the backup is done later, unattended.

You need to follow the instructions for your OS release and version, and there are a number of planning considerations, including how secure your console is, since anyone could SysReq-2 out of the backup and gain access to the system using whatever profile is signed in to do the backup.

Look at the checklist starting on P7 of the V5R4 Backup and Recovery Guide for and example:


Now, on to the original question:

Scheduled Restricted State Backups Possible Starting in V5R3

You didn't mention your OS version, but starting in V5R3, you can put the system into a restricted state in a batch job, something that you couldn't do in prior releases.  You can then run restricted state backups from a scheduled batch job.  Same planning considerations apply, so read the Backup and Recovery Guide first, but this will give you a framework and discuss the possible pitfalls of running console-less for a while:


Pre V5R3?

If you are on an older release, it is still possible, but more work and clunkier.  Several years ago I developed a Windows-based program for a client that, as I recall worked something like this:

On a scheduled basis, our Windows program initiated a remote console connection using Ops Console, signed on, and kicked off the monthly full system save.  We had already automated all of the non-restricted state backups, and this was the last step in full backup automation.  It has been a few years, so details escape me, but it didn't take long to set up.

- Gary Patterson
LVL 27

Expert Comment

ID: 37883941
Gary's reference to the IBM document is a good starting place. But pay very close attention to this 'Note' in that document:
Modifications to the CLP, such as ending applications and TCP prior to ending the subsystems and monitoring for messages, may be advantageous for a customer environment.
Where the note uses the word 'advantageous', you might substitute 'critical'. Maybe.

Without knowing how your system operates, it's mostly a guess whether it will work well or not. Fortunately, if you're already doing daily or near-daily "full-system saves", then your environment can probably tolerate it; but others who read this question in the future may need to consider what other processes might happen at night, e.g., ODBC connections.


Expert Comment

ID: 37884254
I write custom CL for each of my customers.  They are all different.

If you elect to do the same, do yourself a favor and make sure you can get a signon screen if you end QINTER.  I do that by adding a WSE to QPGMR and have it up.  Stuff happens and you may lock yourself out.


Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question