cron ignores time from /etc/cron.d/openmediavault-rsnapshot

  • Hi everyone,


    I have problem with the rsnapshot backups:


    If the system is not (!) running at midnight anacron executes the rsnapshots scheduled daily, weekly, ... in the correct order - fine


    If the system is running at midnight cron executes the rsnapshops although the time is set differently (default OMV settings) in

    Code: /etc/cron.d/openmediavault-rsnapshot
    # Create cron file
    # This is the cron file for openmediavault-rsnapshot.
    # The file /var/lib/openmediavault/cron.d/rsnapshot will mirror
    # the jobs that are configured in the plugin.
    # m h dom mon dow user command
    5 * * * * root /var/lib/openmediavault/cron.d/rsnapshot hourly
    30 3 * * * root /var/lib/openmediavault/cron.d/rsnapshot daily
    0 3 * * 1 root /var/lib/openmediavault/cron.d/rsnapshot weekly
    30 2 1 * * root /var/lib/openmediavault/cron.d/rsnapshot monthly
    00 2 1 1 * root /var/lib/openmediavault/cron.d/rsnapshot yearly


    The problem with this behavior is, that daily, weekly, .. are started at the same time, and therefore the weekly task is not executed and I get the following email----------------------------------------------------------------------------rsnapshot encountered an error! The program was invoked with these options:/usr/bin/rsnapshot -c \ /var/lib/openmediavault/rsnapshot.d/rsnapshot-703e01fb-31a4-431a-ada3-05a3be299f6c.conf \ weekly ----------------------------------------------------------------------------ERROR: Could not write lockfile /var/run/rsnapshot-703e01fb-31a4-431a-ada3-05a3be299f6c.pid: File exists----------------------------------------------------------------------------rsnapshot encountered an error! The program was invoked with these options:/usr/bin/rsnapshot -c \ /var/lib/openmediavault/rsnapshot.d/rsnapshot-9941df1d-78eb-4554-a4f9-59329a06a6f5.conf \ weekly ----------------------------------------------------------------------------ERROR: Lockfile /var/run/rsnapshot-9941df1d-78eb-4554-a4f9-59329a06a6f5.pid exists and so does its process, can not continueHow can I make cron respect the given times and thereby avoid the conflict?Greetings,Martin

  • I found out, that I had no longer (like for older omv versions I think) have to add scheduled tasks manually via the gui. I removed these to get rid of the additional executions at 0:00.
    Since to my understanding the entries in /etc/cron.d/openmediavault-rsnapshot are not being used by anacron, I added the little scripts to call the rsnapshot scripts from cron.daily etc.
    I hope that works now.

Jetzt mitmachen!

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