Migrating resource logs from local storage to object storage on zCX


This topic describes how to migrate resource logs from your local system storage to object storage.

After successfully migrating the resource logs, disable the migration job.

Before you begin

Error
Warning

Make sure that the following conditions are met:

Run the following command to back up your $MODEL9_HOME/backups directory: 

cd $MODEL9_HOME
fileStamp=$(date +%Y-%m-%d)
tar -czf backups-$fileStamp.tar.gz backups

To set up the migration job

  1. Update the following parameters in the model9-local.yml file, which resides in the $MODEL9_HOME/conf/ directory, by using the following commands. The following example schedules the migration job to run at midnight on October 1, 2025:

    #Log in to the Alpine container
    docker exec -it dummy sh
    cd /root

    #Edit the model9-local yml file
    vi conf/model9-local.yml

    #Disable saving resource logs to your local system by deleting the following parameter
    model9.backup.log.saveToFile: true

    #Schedule the migration job to run by specifying the cron expression in accordance with your needs
    model9.backup.log.migration.cron: "0 0 0 1 10 * 2025"

    #Exit from the Alpine container
    exit
  2. Restart the server by using the following command: 

    docker restart model9-v4.3.0
  3. After the scheduled migration job completes, check the server logs and verify that the migration was successful. 

    Information
    Example
    yyyy-mm-dd 13:46:00,718 [quartzScheduler_Worker-1] INFO  z.BackupLogMigrationJob - Time taken to migrate backup log data for total 1026993 records in seconds is 6408.981
    yyyy-mm-dd 13:46:00,718 [quartzScheduler_Worker-1] INFO  z.BackupLogMigrationJob - Successfully updated backup log data for rows: 1026993.
    Error
    Warning

    If any part of your migration job fails, contact BMC Support.

To disable the migration job

  1. Delete the model9.backup.log.migration.cron parameter in the model9-local.yml file.

  2. Restart the server by using the following command: 

    docker restart model9-v4.3.0

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Cloud Data and BMC AMI Cloud Vault 4.3