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
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?
no one?
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.
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
#!/bin/bash
# This script is for triggering all the USB Backup defined jobs in case the drive hasn't been removed.
. /usr/share/openmediavault/scripts/helper-functions
LOGFILE="/var/log/openmediavault/nas_usbbackup_trigger.log"
echo "Starting backups for `date`" >> "$LOGFILE"
# Check storage drive is loaded
if ! omv_is_mounted "/media/854fe912-9f08-423d-9bc8-26a404cae6d0" ; then
echo "External storage device not mounted!" >> "$LOGFILE"
exit 1
fi
# Trigger the predefined
echo "Trigger USB Backup Jobs..." >> "$LOGFILE"
/var/lib/openmediavault/usbbackup.d/rsync-2d5b6c5d-f883-4344-87a1-8039bbc0988d
/var/lib/openmediavault/usbbackup.d/rsync-3390e5ff-8593-406e-9d5c-8dca53a8534e
/var/lib/openmediavault/usbbackup.d/rsync-59bb0278-3548-4552-b666-6c21a6868828
/var/lib/openmediavault/usbbackup.d/rsync-6e33be9d-27ab-4469-8f6d-8aee1085883f
/var/lib/openmediavault/usbbackup.d/rsync-e68d1f97-9b4c-4865-b2eb-f164186837f4
echo "USB Backup jobs complete..." >> "$LOGFILE"
Alles anzeigen
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.
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.
#!/bin/bash
# This script is for triggering all the USB Backup defined jobs in case the drive hasn't been removed.
. /usr/share/openmediavault/scripts/helper-functions
LOGFILE="/var/log/openmediavault/eapenas_usbbackup_trigger.log"
echo "Starting backups for `date`" >> "$LOGFILE"
# Check storage drive is loaded
if ! omv_is_mounted "/media/854fe912-9f08-423d-9bc8-26a404cae6d0" ; then
echo "External storage device not mounted!" >> "$LOGFILE"
exit 1
fi
# Trigger the predefined
echo "Trigger USB Backup Jobs..." >> "$LOGFILE"
omv_beep_start
/var/lib/openmediavault/usbbackup.d/rsync-2d5b6c5d-f883-4344-87a1-8039bbc0988d & wait $!
/var/lib/openmediavault/usbbackup.d/rsync-3390e5ff-8593-406e-9d5c-8dca53a8534e & wait $!
/var/lib/openmediavault/usbbackup.d/rsync-59bb0278-3548-4552-b666-6c21a6868828 & wait $!
/var/lib/openmediavault/usbbackup.d/rsync-6e33be9d-27ab-4469-8f6d-8aee1085883f & wait $!
/var/lib/openmediavault/usbbackup.d/rsync-e68d1f97-9b4c-4865-b2eb-f164186837f4 & wait $!
sync
omv_beep_ok
echo "USB Backup jobs complete..." >> "$LOGFILE"
Alles anzeigen
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.
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.
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!