ou're asking about the core save commands on IBM i (formerly AS400), used for backing up your system and data. Here's a breakdown of SAVOBJ, SAVLIB, and SAVSYS:
SAVOBJ (Save Object)
- Granular Control: SAVOBJ allows you to save individual objects or specific groups of objects within a library. This gives you very fine-grained control over what you're backing up.
- Use Cases:
- Saving specific programs or files that have been modified.
- Backing up critical objects without saving an entire library.
- Archiving individual objects.
- Example:
This command saves the program
MYPROG
from library MYLIB
to the save file SAVEFILE1
in MYLIB
.
SAVLIB (Save Library)
- Library-Level Backup: SAVLIB is used to save an entire library, including all the objects within it (programs, files, data areas, etc.).
- Use Cases:
- Regularly backing up libraries to protect against data loss.
- Creating copies of libraries for testing or development.
- Moving libraries to another system.
- Example:
This command saves the entire library
MYLIB
to the save file SAVEFILE2
in MYLIB
.
SAVSYS (Save System)
- Full System Backup: SAVSYS is the most comprehensive save command. It backs up the entire system, including the operating system, licensed programs, user profiles, configuration objects, and all user data.
- Use Cases:
- Disaster recovery: Creating a complete backup of the system in case of a major failure.
- System upgrades: Backing up the system before applying updates or installing new software.
- System migration: Moving the entire system to another machine.
- Important Notes:
- SAVSYS must be run in a restricted state, meaning that most users and applications need to be offline.
- It's typically performed during off-peak hours or scheduled downtime.
- It's crucial for a complete and restorable backup of your IBM i environment.
- Example:
This command saves the entire system to the tape device
TAP01
.
Key Differences Summarized: