rsnapshot + autoshutdown/WOL - flexible daily backups

  • Did you turn off the anacron job in cron.d?? Anacron is actually started by cron.


    Hi,


    Well, as I don´t know for sure where to find it, I browsed a little bit in cron.d and found the anacron file.
    It says:
    30 7 * * * root test -x /etc/init.d/anacron && /usr/sbin/invoke-rc.d anacron start >/dev/null
    If I understand cron syntax right It starts anacron at 7:30 every day. But most of the time the NAS will be turned off at 7:30. So anacron does not start.


    I could write */20 * * * * , so anacron would be started every 20 minutes. Would this be ok?


    Thanks in advance for your answer!

    • Offizieller Beitrag

    Pretty sure you only want to run anacron once per day. Might duplicate jobs if you run it more than once per day. I would pick a time when you know the system will be on. If there is no specific time it will be on, then schedule a time for it to be on and then shut it down.

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | 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!

  • I feared that this could be the effect, if I start it e.g. every 20 minutes.
    But I don´t understand the advantage of scheduled tasks, if anacron only starts at a specified time. Then I could also use cron. Shouldn´t it always start, when the NAS starts?


    Yesterday, shortly after I started the NAS, I got an email from Anacron which said:
    Anacron job 'cron.weekly' on nas [nas.XXX.XXX]
    /etc/cron.weekly/openmediavault-update-smart-drivedb:
    Updating smartmontools 5.41 drive database ...
    /usr/share/smartmontools/drivedb.h updated from branches/RELEASE_5_41_DRIVEDB


    So anacron does work in a way, doesn´t it?


    I´m sorry, but I´m pretty helpless right now.
    What am I missing? I just want that the backups via rsnapshot are started automatically independent of specific times.

    • Offizieller Beitrag

    Yes, anacron is supposed to start whenever you turn your system on. That is why there is an "at boot" time. I don't know why your system wouldn't work. I do know the "at boot" task doesn't run instantly after turning your system on. So, maybe your system wasn't on long enough? Does your system turn on and off more than one time per day?

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | 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!

  • Usually not. When I need access to data on my NAS I start it and usually power it off before I go to bed or when I know that I won´t need it the rest of the day.
    But I would not exclude the possibility that it starts more than one time per day.


    I will let it run several hours now to see if something happens.


    Where can I find the file where this "at boot" should be?

    • Offizieller Beitrag

    If you power it up more than once per day, it won't work with my idea of using /etc/rc.local. At boot is an option in scheduled tasks but that won't work either if you power up more than once per day.


    There doesn't seem to be a good solution. So, I'm really not sure what to tell you other than set your system to turn on at 3:30am, run rsnapshot, and turn it back off.

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | 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!

  • My NAS ran almost 7 hours today, I started it at about 3:30pm or 15:30. I started it only one time today. But there was no backup done during this time.


    If I understand you correctly, a backup should have actually started then.

    • Offizieller Beitrag

    A daily anacron task should have run. I assume it works when you test it?

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | 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!

    • Offizieller Beitrag

    What is the output of: cat /etc/anacrontab

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | 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!

  • The output is:


    # /etc/anacrontab: configuration file for anacron
    # See anacron(8) and anacrontab(5) for details.


    SHELL=/bin/sh
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    HOME=/root
    LOGNAME=root


    # These replace cron's entries
    1 5 cron.daily run-parts --report /etc/cron.daily
    7 10 cron.weekly run-parts --report /etc/cron.weekly
    @monthly 15 cron.monthly run-parts --report /etc/cron.monthly

    • Offizieller Beitrag

    Not sure. You could try putting the line: /usr/sbin/anacron in your /etc/rc.local before the exit 0 line.

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | 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!

    • Offizieller Beitrag

    The date it ran last will be in the files in /var/spool/anacron/


    cat /var/spool/anacron/cron.daily

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | 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!

    • Offizieller Beitrag

    Maybe something in /etc/cron.daily/0anacron is failing?? What is the output of: ls -al /usr/sbin/anacron

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | 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!

    • Offizieller Beitrag

    That is correct. I'm out of ideas. I have no idea why it isn't working.

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

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | 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!

Jetzt mitmachen!

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