6 Logs and Error Handling
Detailed execution logs are available under $toolHome/logs. The main log for this script is migration_script.log. Log is always appended to, so all previous execution attempts will remain in the log. To get the log for only the most recent script execution, either move the existing log to another location or delete it before re-running the script.
If any step fails:
- Check the error details in
migration_script.log - Fix the issue (for example, missing permissions, incorrect environment variables, or insufficient disk space)
- Rerun the script:
$ bash migration_script.shSince the script is idempotent, previously completed steps will be skipped, and execution will resume from the failed step onward.
Example Run:
bash migration_script.sh
2025-09-17 13:52:15 [info] Installing dependencies...
2025-09-17 13:52:15 [info] Checking prerequisites...
2025-09-17 13:52:17 [info] Discovering WebLogic domain...
2025-09-17 13:52:56 [info] Discovering infrastructure...
2025-09-17 13:53:14 [info] Discovering datasources...
2025-09-17 13:53:25 [info] Building OCI Resource Manager stack...
2025-09-17 13:53:25 [info] Stack file created: /home/oracle/mig/oci-weblogic-migration/oci/stack/owm_rm_202509171353.zip
2025-09-17 13:53:25 [info] Uploading owm_rm_202509171353.zip to OCI Object Storage bucket wls_mbimg...
2025-09-17 13:53:28 [info] owm_rm_202509171353.zip uploaded to bucket wls_mbimg.
2025-09-17 13:53:28 [info] Generated PAR URL (valid 6 months): https://ax8cfrmecktw.objectstorage.us-ashburn-1.oci.customer-oci.com/p/ItgGDQVxon0cVpmqP4yp5E3fZkX2xMJ4LKydmQLTjVrb8DAWGh-0n0XZwTbOA8kk/n/ax8cfrmecktw/b/wls_mbimg/o/owm_rm_202509171353.zip
2025-09-17 13:53:28 [info] Archiving WebLogic domain...
2025-09-11 14:11:13 [info] Migration script completed successfully!