Backup is the part of the job you genuinely answer for. Everything else can be put right; this cannot.
The question that matters is not "do we take backups" — everyone does — but how much work is lost if the system stops now, and how long before we are running again. If you cannot answer with a number, there is no backup plan yet: there is a procedure that runs at night.
What there is to save
A complete IBM i is made of parts saved by different commands:
- the operating system and security data —
SAVSYS; - the IBM libraries holding the installed products;
- the user libraries, meaning the application and the data —
SAVLIB LIB(*ALLUSR); - the IFS objects —
SAV, the other file system's command; - the configuration of devices and network —
SAVCFG.
Which is why there is a menu that lines them up:
GO SAVE
Three options matter more than the others: 21 saves the entire system, 22 system data only, 23 all user data.
Warning
option 21 requires the system to be in a restricted state — no subsystems active, nobody signed on. It is the save that genuinely serves as a base for rebuilding a machine from nothing, and it needs scheduling in a window where the system can stand still. A plan made only of hot library saves does not let you start again from an empty disk.
Journals
A nightly save returns the system to how it was last night. The eight hours of work since are recovered only if there is a journal.
Journaling records every change made to a file in a separate object, the journal receiver. From a save plus the journal, state is rebuilt up to the last recorded transaction.
CRTJRNRCV JRNRCV(JRNLIB/RCV0001)
CRTJRN JRN(JRNLIB/JRNPROD) JRNRCV(JRNLIB/RCV0001)
STRJRNPF FILE(PRODLIB/ORDERS) JRN(JRNLIB/JRNPROD)
Journaling is not only for recovery: it is the prerequisite for commitment control — no journal, no transactions — and the foundation every replication and high-availability solution works on.
Warning
journal receivers grow, and they are the classic second cause of a full disk
after spool. Management should be set up so the system detaches and deletes them itself
after the save (CHGJRN with automatic receiver management), not left to manual cleanup.
And a receiver not yet saved must not be deleted: it takes with it exactly the work you
would have needed to recover.
The tape is not the point
The question "what do we save onto" — tape, virtual library on disk, appliance — matters less than it seems. Three things matter, and in practice they are the ones missing:
That the save can be read. A backup never read back is not a backup. Verifying is not checking that the job ended successfully: it is restoring something, onto a test system or into a different library, and seeing that it is there.
That a copy is elsewhere. A tape in the cabinet next to the machine protects against disk failure and not against fire, flood, or a ransom demanded by whoever encrypted the network.
That somebody knows how. A full system restore is a long procedure with a precise order, performed for the first time at the worst possible moment. It is worth having written down and having rehearsed at least once.
Tip
where backup is governed by BRMS, most of this work is already set up by someone who did it professionally. It is worth understanding how it is configured rather than building a parallel procedure: two backup systems unaware of each other are worse than one.
Restoring
The commands mirror the save ones — RSTLIB, RSTOBJ, RST, RSTUSRPRF, RSTAUT — but
the order is not indifferent, and it is the part people get wrong under pressure: user
profiles before objects, authorities last with RSTAUT.
Warning
restoring objects that came from another system is the moment the system
value QALWOBJRST decides what is permitted. Set permissively it allows restoring
programs with adopted authority and system objects: handy during a genuine restore,
dangerous as a permanent setting.
Comments
No comments yet. Be the first to comment!
You need an account to comment. Log in · Sign up