2.4.8 Function Keys
2.4.8.1 Create a new Job
F6 – Create a new Job. (See Section 2.4.1 – “Create A Job” for more details.)
2.4.8.2 Shortcut to Agent Directory F7 – Shortcut to Agent directory.
Figure 27. - Work with Object Links
The following are IBM i Commands, and are not described here. • Edit
• Copy
• Remove
• Display – (usually just this one is used to display the contents of a file.)
• Rename
• Display Attributes
• Change Current Directory
2.4.8.3 Display Running Job Status
2.5 Work with Schedules
A Job (for example, a Backup or Synchronize, but not a Restore) can be run at pre- determined (scheduled) times. All Jobs can also be run “manually” (ad-hoc, or unscheduled) when desired.
Note: Do not use IBM Advanced Scheduler for submitting Agent Jobs. The Agent uses the standard job scheduler, which requires multi-threading. IBM Advanced Scheduler uses RCLRSC command internally, which is not compatible with multi-threaded applications.
Figure 28. - Work with Schedules – Main Menu
The IBM i Agent needs a minimum of *ALLOBJ rights, to be able to do backups. That is, the Agent needs enough rights to be able to open/read all libraries and objects.
Options: Create, Change, Delete, Disable/Hold Enable/Release.
2.5.1 Create a Schedule
Figure 29. - Work with Schedules – Create Backup Schedule Command – Backup, Synchronize, Custom
Fields for Backup:
Job Name – Select a Job name that you have previously defined.
Retention Name – Select a Retention that you have previously defined.
Command Cycle – Weekly, or Monthly.
Minutes/Hours – Time to start.
Days of week – Which days the Job will run.
Quick File Scanning – YES or NO. Do you want to Backup any objects that have not changed since the last Backup.
Deferring:
Disable – NO or YES
Times – 15 to 2880 minutes (i.e.: up to 48 hours). If the Backup Job does not complete in this length of time, it will pause and continue at the next scheduled Backup time.
Note: If you have the Defer option enabled, and the Backup does not complete in the allotted time, the system will stop the Backup, and complete it during the next Backup time. To be able to stop the Backup, the operating system must “abnormally” stop the Backup Job (the Backup API). This will create errors in the Backup.log, but they are normal in this case. The log will also have a message similar to:
“BKUP-W-0363 Backup window expired, intra-file defer.”
All object related errors after this line may be safely ignored, since the object that was deferred will be backed up during the following Backup.
Fields for Synchronize:
Job Name – Select a Job name that you have previously defined.
Command Cycle – Weekly, or Monthly.
Minutes/Hours – Time to start.
Days of week – Which days the Job will run.
Fields for Custom:
Job Name – Select a Job name that you have previously defined.
Custom Command - <enter an IBM i command>
Command Cycle – Weekly, or Monthly.
Minutes/Hours – Time to start.
2.5.2 Change a Schedule
Figure 30. - Work with Schedules – Change
These fields are the same as Create.
2.5.3 Delete a Schedule
You may want to delete a schedule if it is no longer being used, or is associated with any existing Jobs.
2.5.4 Enable/Release
This turns off the Disable/Hold function and allows a Job to become active in the IBM i job queue.
2.5.5 Disable/Hold
A scheduled Backup may be “paused” by holding it in the queue. You may want to do this depending on your system status, or its activity, or if there are known problems or conditions which would cause the Backup to not be successful. It will stay disabled until you release it.
3 Backup Jobs
Once all the Agent Configuration information has been entered, and a schedule set up, as in the previous chapter, the Backups will take place automatically.
Note: The initial Backup is a “seed”. This first time, the Backup will copy everything that you had selected (in a compressed format) to the vault. The next Backup time (with the same files and directories) it will only copy the parts that have changed. Each time that it does this, the vault knows which parts are new, and which haven’t changed, so that when you do a Restore, it supplies everything back to you, and it is all up to date. This functionality means that you don’t waste time and bandwidth copying data that has not changed. You can see the results of this in the Backup log file, where the actual data copied is less than the data in the files.
On occasion, you may need to run a “one-time” Backup for a special reason. You can either use an existing Agent and Job (and modify it) or create one specifically for this Backup.
Figure 31. - Run Backup
Job Name – Choose an existing (previously configured) name.
Retention Scheme – Choose an existing (previously configured) name.
Quick File Scanning – NO or YES. This option is used to reduce the amount of data read during the Backup process. Any file streams that are deemed unchanged since the last Backup are skipped over. *YES is highly recommended, and is selected by default.
Disable Deferring – NO or YES. If the Backup takes longer than the Backup window time frame, it can be deferred (paused) until the next scheduled Backup period.
Disable Deferring – NO. The Backup will run until the “Defer after” time is reached. The Backup will pause until the next scheduled Backup time. You would use this, for
example, for a large Backup (i.e.: an initial seed) that might take several scheduled periods, and you do not want the Backup to run during times when the machine is needed for regular work.
Disable Deferring – YES. The Backup will run until it finishes, even if it runs into the time period of the next scheduled Backup. If you use “Yes” here, you will not see the “Defer after” option.
Defer after – Choose a value from 15 to 2880 minutes, with the default being 480. After this time expires, and if the Backup is not finished, the Backup will pause until the next scheduled Backup time.
4 Hot Backup
There are two methods for Hot Backups provided in this release of the IBM i Agent: Journaling and Triggers. These are outlined in the following sections.
4.1 Journaling
Note: Refer to the IBM i user guide to setup journaling on the database if the database is not currently journalled.
It is recommended to create a single journal per library to be backed up to simplify administration and place the journal and receivers in that library.
Create the main Job to Backup all user objects and data and specify two exclusions for *JRN and *JRNRCV object types. Specify *SYSDFN in the save active parameter.
Create two additional Jobs: one for *JRN and one for *JRNRCV object types.
The proper sequence for running the Jobs is very important. Thus, they should be submitted to a job queue that allows only one active Job.
Backup
The Backup sequence is:
• First, run the main Backup Job
• Second, run the *JRN Job
• Third, run the *JRNRCV Job
If this sequence is not done correctly, and updates occur to data while the Backup is running, then some journal receivers might not contain all the required data for point in time recovery.
Restore
The Restore is performed in the reverse order of Backup: • First, run the *JRNRCV Job
• Second, run the *JRN Job
• Third, run the main Restore Job
If this sequence is not followed, then some objects might not be journalled after the Restore.
4.2 Triggering
The version 6 IBM i Agent supports hot Backup features to “snapshot” native data physical file (PF-DTA) by using triggers.
Under this feature, the Agent is able to save database changes that were made while the Backup is running, and also can revert those changes back to the point of Backup startup.
Triggering Setup
When you choose the save active *TRIGGER setting in Job configuration, Backup triggers will be added to PF-DTA objects which are contained in the Job include list. During creation or changing an *OBJ Job with the *TRIGGER setting, a confirm screen will be shown.
Figure 32. - Triggering
In this screen you would see a list of objects with trigger status. The F7 function key can let you switch the screen to show all affected objects or those that will be changed in the current operation.
Trigger Status:
To be applied: Trigger will be applied to the object.
Applied: Attempting to apply trigger to which has been applied in previous operation.
Removed: Attempting to remove trigger from which has been removed in previous operation.
Users can choose “YES” to confirm the changes, or press F3 to exit the configuration.
Restrictions
1. Only physical database files are supported. Physical source file, logical file, save file and device file are excluded.
2. Supported database files cannot contain the following columns: a. CLOB
b. BLOB c. DBCLOB d. ROWID e. Data link
5
Automatic Job Creation
5.1 Introduction
• Automatic Job Creation can create multiple Jobs for backing up all libraries except for the excluded libraries selected by the user. Creation of multiple Jobs enables effective utilization of CPU cycles, hence faster Backup processing.
• The Automatic Job Creation Tool is used by customers who wish to perform a Backup of the entire IBM i system.
• The Jobs created by the Automatic Job Creation Tool have the capability to Backup any libraries that may be created in future.
• The Automatic Job Creation Tool is a one-time use tool. Once used for creating the most appropriate Jobs, the tool cannot be used for a second time.
5.2
Job Creation Main Menu
Figure 23. - Job Creation Main Screen
1. Create Database:
This creates the Job Creation Database, which contains the information about all the libraries and objects inside the libraries present in the system, and also the size and count of the objects that reside in each library.
2. Library/Job Selection:
This allows the user to exclude libraries and select/assign the libraries to different Jobs to be created by Job creation.
3. Retention Schedule:
This allows the user to schedule the retention schemes like weekly, monthly etc. Also, the options for deferring and quick file scanning can be specified here.
4. Retention Job Selection:
This allows the user to assign the defined multiple retention schemes to Jobs created by Job Creation and create auto scheduler entries for Backup.
5. Create Jobs:
This allows the user to select the vault and create the Jobs with default parameters.
5.3 Library/Job Selection
5.3.1 Exclude Libraries
Figure 24. - Exclude Libraries
This is the first screen of the Job Creation Tool. You can enter the libraries to be excluded from the Jobs. The excluded Libraries are not shown as selected on the Libraries selection screen.
F2: Saves the libraries to be excluded. F3: Exits from Exclude Libraries screen. F6: Displays the “select libraries” screen.
Notes:
2.
Wild card characters e.g. A*, B* etc. are not supported while specifying the library names.5.3.2 Select Libraries
Figure 25. - Select Libraries
The above grid displays the Jobs as column headers and the list of all libraries as row headers. Symbol ‘_‘indicates the particular library is not included in the respective Job. Symbol ‘X’ indicates the particular library is included in the respective Job. For example, in the above screen ‘#COBLIB’ library is included in Job ‘J1’.
1. Job Limit: Indicates approximate Jobs to be created by the Job Creation Tool. This parameter can be changed by the user, as required. By default the value will be ‘number of CPUs (including LPAR CPUs) X 4’. In case the number of CPUs is not retrievable, it is defaulted to 1 by the Job creation.
2. Object Size/Job: This is the optimal object size per Job as calculated by the Job Creation Tool. There can be instances where the size of the Job can be greater or less than calculated value of object size/Job.
3. Object Count/Job: This is the optimal object count as calculated by the Job Creation Tool. This is shown in multiples of 1000. There could be instances where the count of the objects is greater or less than the calculated value of object
count/Job.
4. Include Libraries: Here the user can enter X against the libraries that need to be included during Backup. By default all the libraries will be selected. However the libraries starting with Q except QSYS, QGPL, and QUSRSYS will not be selected. If other such libraries are selected those will be included.
5. Total Object Size: This is the size of all the Libraries (Including the objects inside libraries), which have been selected for Job creation.
6. Total Object Count: This is the count of all the objects, which have been selected for Jobs. This is shown in multiples of 1000.
You have an option to edit exclusions and inclusions on this screen.
Figure 26. - Adjust Include/Exclude List
Upon pressing F6, the above screen appears. When the Include/Exclude count of one or more Jobs exceeds 128, the user is prompted to choose whether to let the Job Creation Tool reshuffle the libraries in order to limit the include/exclude list. By providing ‘Y’ you can let the system reshuffle the include/exclude count. By providing “N” you can come back to the original screen and increase/decrease the number of Jobs in order to bring the include/exclude count to less than 128.
There could be instances where even the system will not be able to make the
Include/Exclude count lesser than 128. In such cases, the user can manually decrease the count of Jobs and retry.
F2: saves the changes made on the current screen. F3: Exit from the screen.
F4: Recalculates the parameters and arrangement of libraries and Jobs.
F5: Replaces the current screen with original arrangement of libraries and screen values.
F6: Creates Include and Exclude list for the Job creation. F7: Previous screen to see previous Jobs
F9: Sorts the Jobs alphabetically.
F10: Sorts the Jobs on size in descending order.
F11: Displays the list of Job names with their include/exclude count.
Notes:
1. The changes in library selection must be saved on the same screen itself.
2. Once the user changes any of the first three parameters mentioned above, pressing F4 recalculates the other two parameters and the arrangement of libraries and Jobs. 3. In case of Include or Exclude count goes beyond 128 the system throws an error. The user can change the input criteria, recalculate and create new list or Job Creation Tool can reshuffle the library/Job selection to reduce the Include/exclude count to 128. 4. Object size/Job when adjusted, is truncated to a lower integer.
e.g. 0.22, 0.45, 0.9 etc. are shown as 0 1.3, 1, 7, 1.9 etc are shown as 1.
5. Object count/Job, when adjusted, is truncated to a lower integer. e.g. 0.3, 0.5, 0.9 etc. are shown as 0
1.2, 1, 5, 1.8 etc are shown as 1.
6. Unless the database is created, the user cannot work with this option.
5.3.3 Include/Exclude List
Figure 27. - Include/Exclude List
The above screen shows the Job names. The Job names are formed with the first character of the include/exclude library names.
Libraries starting with A will be included where the maximum number of libraries starting with an “A” are found and so is the case for all other libraries except “Q”. Libraries
starting with “Q” will not be included as generic Q*. The Exclude list does not support the use of generic library names like A*.
Notes:
1. All the special characters “, @, #, $, / are replaced by $ in Job names.
2. If the user manually deselects all the libraries from the Job, that Job will be listed as blank on this screen.
3. Once the user finalizes the include/exclude list, he/she has to go to “auto Job menu” by pressing F3 thrice.
4. Considering the Backup of future libraries the generic include for A* to Z*, @*, #*, $* and /* except Q* will be added in different Jobs.
5.4 Retention Schedule
Figure 28. - Retention Schedule
Once the user creates the Jobs, he/she can proceed with Retention Scheduling. All the retentions are retrieved from the Agent repository (Global.vvc) file.
Retention: Retrieves the retentions from the Agent repository (Global.vvc) file.
Period: Period will be *WEEKLY or *MONTHLY
Days/Month (MTWTFSS/1-31): This can be any day from Monday to Sunday or the dates from 1st to 31st and also*First, *Last.
Example: If you want to run the Jobs on Tuesday, Thursday and Sunday, you should enter _T_T__S.
Time: The time in Hour and minute. The Hour is in 24 hours format HH:MM.
Quick Scan: This can be *YES or *NO.
*YES for any file streams/objects that are deemed unchanged since last Backup are skipped over.
*NO for all the objects will be considered for back up.
Defer Disable: This can be *YES or *No. *YES: The back up will run until it finishes.
*NO: The Backup will run until the ‘Defer after ‘time is reached. The Backup will pause until the next scheduled back up time.
Defer Time: This can be any number in minutes. You can choose a value form 15 to 2880 minutes. After the specified time expires and if the Backup is not finished, the Backup will pause until the next scheduled Backup time. If Disable Defer is *YES, this time is not required.
F2: Saves the entire retention schedule with the input parameters. F3: Exit from Retention Schedule screen.
Notes:
1. If retentions are deleted from the Agent, the deleted retention will still be shown on the Retention Schedule screen.
2. The retention length shown here is of 31 characters, although the maximum Retention length allowed is of 32 characters.
3. You cannot work with this option while the database creation is in progress.
5.5
Retention Job Selection
Figure 29. - Retention Job Selection
After creating the Jobs, the user needs to select a retention for the Jobs. For this, the user should enter ‘X’ in order to select a retention type for a particular Job.
In the Retention Selection screen the user assigns the retention schemes to the Jobs that are created.
Retention (Ret): This screen shows a matrix with the retention schemes as the rows.
Job: On the screen matrix‘s columns header are Jobs .J1-J99 F2: Saves the current configuration for the selected Retentions F7: Moves to the previous page.
F8: Moves to the next page. F9: Creates Scheduler
F12: Cancels the Retention selection. The current changes after last Save (F2) will not