Solved

Automated AS400 Backup Procedure

Posted on 2012-04-10
10
2,111 Views
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

Thanks
0
Comment
Question by:rodneygray
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 5

Expert Comment

by:stevebowdoin
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.

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

Regards,
Murph
0
 
LVL 27

Expert Comment

by:tliotta
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.

Tom
0
 
LVL 1

Author Comment

by:rodneygray
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.
0
 
LVL 5

Expert Comment

by:stevebowdoin
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.

Steve
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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 :-)
0
 
LVL 27

Assisted Solution

by:tliotta
tliotta earned 250 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.

Tom
0
 
LVL 34

Accepted Solution

by:
Gary Patterson earned 250 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:

ENDSBS SBS(*ALL) OPTION(*IMMED)
SAVSYS                          
SAVLIB LIB(*NONSYS) ACCPTH(*YES)
SAVDLO DLO(*ALL) FLR(*ANY)        
SAV OBJ(('/*') ('/QSYS.LIB' *OMIT) ('/QDLS' *OMIT) UPDHST(*YES)    
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:

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/books/sc415304.pdf

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:

http://www-01.ibm.com/support/docview.wss?uid=nas18b3e751504de3a18862570f4004c810f

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
0
 
LVL 27

Expert Comment

by:tliotta
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.

Tom
0
 
LVL 5

Expert Comment

by:stevebowdoin
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.

Steve
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
RPG to c# 3 326
Check file/object size on AS400 3 153
Catalog Index 9 114
best way to update esxi hosts 6 97
In  today’s increasingly digital world, managed service providers (MSPs) fight for their customers’ attention, looking for ways to make them stay and purchase more services. One way to encourage that behavior is to develop a dependable brand of prod…
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now