How to retrieve rsync job values


  • I'm doing some custom scripting, to be able to log start and end times of an rsync job. I'm wanting to utilize the Comment field of an rsync job as the value for the log file. How can I retrieve this information? Looking at the rsync mkconf I see this code:

    Code
    srcuri=$(omv_config_get "//services/rsync/jobs/job[uuid='${uuid}']/src")
    srcuriarg="${srcuri}"
    destsfref=$(omv_config_get "//services/rsync/jobs/job[uuid='${uuid}']/dest")
    desturi=$(omv_get_sharedfolder_path "${destsfref}")
    desturiarg=$(omv_escapeshellarg "${desturi}")
    destmntdir=$(omv_get_sharedfolder_mount_dir "${destsfref}")


    which makes me think there is something similar to retrieve the Comment value. I thought...hoped...this would work:


    Code
    logfile=$(omv_config_get "//services/rsync/jobs/job[uuid='${uuid}']/comment")


    Am I close? Any suggestions?

    • Offizieller Beitrag

    Yes that is correct. Why not add a field for the log file or parse the current log file?

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • what is correct? my guess at retrieving the comment value?


    oh! I check the syntax of my script and I had an error. It's doing what I hoped! Thanks for the confirmation!


    Figured it out


    I modified /usr/share/openmediavault/mkconf/rsync:


Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!