MQ

MQ

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Archive transactionlog IBM MQ Helm Chart

    Posted Mon September 02, 2024 04:08 PM
    Edited by Infra Integratie Tue September 03, 2024 03:14 AM

    Hello,

    Objective:

    We need to archive the transaction logs located in
    /mnt/mqm-log/log/$QMGR/active/ as a backup for a duration of two weeks. Our plan is to create a daily backup of these transaction logs.

    Problem:

    We tried using a Kubernetes CronJob to mount the volume for this purpose, but the attempt was unsuccessful due to the PVC access mode being set to ReadWriteOnce, as mentioned in the README.
    We also considered using an init container to achieve this, but this approach is not ideal given the large volume of transaction logs, which would significantly delay the startup of the MQ container. 

    And Our cloud team strongly advises against using kubectl exec for automation because it creates brittle, hard-to-maintain scripts and lacks scalability.

    Request:

    Could you recommend any alternative methods to accomplish this within a Kubernetes environment?

    Additional Details:

    • Image: icr.io/ibm-messaging/mq:9.4.0.0-r1
    • Configuration: Native HA deployments
    • Platform: Kubernetes
    • MQ: Helm Chart

    Thank you!

    ------------------------------
    Infra Integratie
    ------------------------------



  • 2.  RE: Archive transactionlog IBM MQ Helm Chart

    Posted Tue September 03, 2024 04:18 AM

    A Kubernetes ReadWriteOnce volume means that it can only be accessed by a single Node, but it should be possible to access it with multiple Pods on that Node.  See Persistent Volume access modes.  You can schedule your CronJob to run on the same Node as an existing Pod using Pod affinities.  See Inter-pod affinity and anti-affinity.

    Another approach is to use Persistent Volume snapshots, and ensure that your recovery logs are on a separate volume.  See Volume snapshots.

    However, with all of this, be advised that a two-week old backup of your recovery logs may not be very useful in a messaging system.  Normally MQ is used for more transient data, so during those two weeks, the messages will have been processed to completion, and therefore are no longer relevant.  For this reason, we normally see people doing configuration-only backups (e.g. with dmpmqcfg).



    ------------------------------
    Arthur Barr
    Container Architect, IBM MQ
    IBM
    ------------------------------



  • 3.  RE: Archive transactionlog IBM MQ Helm Chart

    Posted Tue September 03, 2024 04:38 PM

    IBM MQ is like a pipe through which messages flow.  IBM MQ doesn't initiate transactions.  After a few seconds or minutes, the messages will have been processed to completion, and therefore are no longer relevant. 



    ------------------------------
    bruce2359
    Consultant/trainer
    CTTECH - Computer & Telecommunications Technology
    West Coast, almost
    000-000-0000
    ------------------------------