Trigger USB Backup jobs to run via anacron

  • I have a number of jobs configured under USB Backup.
    They run when the system is rebooted or when the USB drive has been disconnected and reconnected - i think


    Is there a CLI command i can run to trigger these jobs daily please

  • no one?


    I have a number of jobs defined in the USB Backup, so they auto sync if the drive is removed,
    but i leave the drive connected (kind of defeats the purpose i know) and i want these jobs to run daily while the USB Drive is connected and automatically upon connection if the drive has been removed.


    I thought all i would need to add, is an anacron script to run daily, then both objectives would be achieved no?

    • Offizieller Beitrag

    Look in the /var/lib/openmediavault/usbbackup.d for the name of the script (should look like sync-34EB-0367). Executing this will mount the drive, execute the backup, and unmount the drive.

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


    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!

  • ryecoaaron, I tried to get them to run with the script below, but the don't fire up, even with a manual run of the script. can you please tell me what i am doing wrong


    • Offizieller Beitrag

    That is the wrong one. There are two scripts. One that mounts the drive, executes the other script, and unmounts the drive. And one that does the backup. You are try to execute the one that does the backup.

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


    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!

  • ryecoaaron, that is the anacron script i created to trigger the job, it is not the original.


    There are 5*rsync scripts which correspond to the each of the 5 backup jobs i have defined is USB Backup and 1*sync which seems to trigger them all.


    I don't want to unmount the drive, so i need to create a custom script for anacron, that runs the individual rsync scripts. but when i click run for a manual run and start, i just get the wait but no output. The log file shows.


    Starting backups for Thu Oct 30 07:30:11 CET 2014
    Trigger USB Backup Jobs...
    USB Backup jobs complete...


    but i think the scripts are not running, because they don't have .sh on the end. My latest code is below.


  • Why does USB Backup unmount the USB Drive after the job? this should be an optional choice, as the drive maybe used for other purposes as well.


    i found my problem. the USB Backup plugin unmounts the drive after the job has run.

    • Offizieller Beitrag

    The usb backup plugin is meant to start when you plug the drive in. It unmounts because most people (I do) remove it right away.

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.7


    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!

Jetzt mitmachen!

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