The other day, a customer showed me their more-or-less fully automated patching process. Part of the process involved:
- A nightly job that starts AutoUpgrade to download the latest Release Update and MRP.
- If AutoUpgrade downloads a new patch, the job builds a new gold image.
- Next, it deploys the new gold image to test servers.
- Then, notifies the DBAs, so they can start testing when they arrive at the office in the morning.
That’s such a cool process. I’m a huge fan.
But one question came up:
We run AutoUpgrade through an Ansible runbook. How can we know which patches are new?
Parsing Console Output
When downloading patches, AutoUpgrade prints the patch description and file name to the console along with a status.
------------------------------------------------------
Downloading files to /Users/doverbyh/Downloads/patches
------------------------------------------------------
DATABASE RELEASE UPDATE 19.32.0.0.0
File: p39472050_190000_Linux-x86-64.zip - LOCATED
OPatch 12.2.0.1.53 for DB 19.0.0.0.0 (Sep 2026)
File: p6880880_190000_Linux-x86-64.zip - LOCATED
DATAPUMP BUNDLE PATCH 19.32.0.0.0
File: p39657094_1932000DBRU_Generic.zip - LOCATED
OJVM RELEASE UPDATE 19.32.0.0.0
File: p39222882_190000_Linux-x86-64.zip - LOCATED
DATABASE MRP 19.32.0.0.260915
File: p39971265_1932000DBRU_Linux-x86-64.zip - VALIDATED
You can use the status to determine whether the file is new:
VALIDATED: This file was not on disk and has been downloaded.REPLACED: This file was already on disk, but was re-downloaded.LOCATED: The file was already on disk.
To use this information with a script, you must parse stdout and put the pieces together. Doable, but not very elegant.
Checking the Patch Info File
In the download_folder, you find patches_info.json, which is an overview of all the files downloaded by AutoUpgrade.
Here’s an example:
{
"patchFolder": "/home/oracle/patch-repo",
"generatedAt": "2026-10-06T07:54:27.930456Z",
"patches": [
{
"description": "DATABASE MRP 19.32.0.0.260915",
"platform": "Linux x86-64",
"patchId": 39971265,
"releasedDate": "+58659-01-03T15:56:40",
"files": [
{
"name": "p39971265_1932000DBRU_Linux-x86-64.zip",
"checksum": "029A3847AC9A38571E052440AA187D5AE147A24D",
"checksum-256": "090348A58923A031212628BE9A69F2E800C16933C7CF53678CB070A3DA1630B1",
"size": 29432590,
"lastUpdated": "2026-09-21T05:23:05.158447Z"
}
]
},
...
- The
lastUpdatedtimestamp indicates when the file was downloaded. TheZat the end indicates UTC, also known as Zulu time. - The customer only wants to create a gold image when a new Release Update or MRP arrives. They can use
descriptionto filter the patches. - A single patch may consist of multiple files, so your code needs to take that into consideration.
The JSON file is much better suited for automation.
Checking the Log File
You can also use the AutoUpgrade log files. For download mode, you find them here:
<global.global_log_dir>/cfgtoollogs/patch/auto/aru
To find a list of downloaded files, you can look in aru_user.log:
grep "Finished the downloading" aru_user.log
...
2026-10-06 09:54:21.434 INFO Finished the downloading of DATABASE RELEASE UPDATE 23.26.3.0.0(GOLD IMAGE) - p39581612_230000_Linux-x86-64.zip
2026-10-07 06:41:44.070 INFO Finished the downloading of DATAPUMP BUNDLE PATCH 19.32.0.0.0 - p39657094_1932000DBRU_Generic.zip
2026-10-07 10:38:18.046 INFO Finished the downloading of autoupgrade.jar 26.6 (September 2026) - autoupgrade.jar
2026-10-07 10:39:06.251 INFO Finished the downloading of DATABASE MRP 19.32.0.0.260915 - p39971265_1932000DBRU_Linux-x86-64.zip
- Each line matches the download of one file.
- The line contains the download timestamp, patch description and file name.
- A patch consists of one or multiple files, so don’t assume that each line represents a different patch.
Grepping a text file works, but it’s not the best option for automation.
That’s It
AutoUpgrade fits perfectly into your automation. The information is available through the console, log files, and patches_info.json. For automation, I’d go with JSON.
If there’s anything we can change to make AutoUpgrade even more suitable for automation, leave a comment and I’ll see what we can do.
Happy patching!