Automatically waking server for RSnapshot backups and then sending it back to sleep again

  • Hi there.


    Thanks to some really helpful advice on there, already, I have a headless PC-based server that can back up various folders from main server.


    At the moment, I am leaving my server on all the time and manually running the RSnapshot plugin for each of the folders that I need to be backed up.


    However, I would like to set it up so I can just leave it to do its own thing.


    I have a few further questions, if that is OK:


    1. How I can set up the RSnapshot to run automatically?


    2. Which plugin should I use to wake my server from suspend, when a backup is due?


    3. I assume that I can then use the Autoshutdown plugin to then put the PC back to suspend. There are quite a few options, so which should I choose? Ideally, I would like the PC to return to sleep after 10 minutes of inactivity (this give the server time to carry out backups plus anything else that it might need to do, like diskchecks etc).

    • Offizieller Beitrag

    How I can set up the RSnapshot to run automatically?

    If the job is enabled and at least one of the hourly, daily, weekly, monthly, or yearly fields are greater than 0, then they are scheduled.

    Which plugin should I use to wake my server from suspend, when a backup is due?

    There is no plugin that does this really. I guess you could send a WOL packet using the rsnapshot pre-exec field to wake it up using the wakeonlan command (install the WOL plugin to install the command). I didn't test this though. You would probably need to sleep for a bit after sending the packet to give the remote server time to wake up

    wakeonlan MAC_ADDRESS_OF_REMOTE_SERVER && sleep 300

    There are quite a few options, so which should I choose?

    I can't think of a better option than the autoshutdown plugin.

    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!

  • If the job is enabled and at least one of the hourly, daily, weekly, monthly, or yearly fields are greater than 0, then they are scheduled.

    There is no plugin that does this really. I guess you could send a WOL packet using the rsnapshot pre-exec field to wake it up using the wakeonlan command (install the WOL plugin to install the command). I didn't test this though. You would probably need to sleep for a bit after sending the packet to give the remote server time to wake up

    wakeonlan MAC_ADDRESS_OF_REMOTE_SERVER && sleep 300

    I can't think of a better option than the autoshutdown plugin.

    Brilliant - thanks very much.


    I have used the default settings for the RSsnapshot plugin to run - what time will it automatically run each day?


    There is no plugin that does this really. I guess you could send a WOL packet using the rsnapshot pre-exec field to wake it up using the wakeonlan command (install the WOL plugin to install the command). I didn't test this though. You would probably need to sleep for a bit after sending the packet to give the remote server time to wake up

    wakeonlan MAC_ADDRESS_OF_REMOTE_SERVER && sleep 300

    I am going to give this a go and shall report back.


    I wasn't sure if I could use the WakeAlarm, in the Autoshutdown plugin, for this purpose.



    I can't think of a better option than the autoshutdown plugin.

    My apologies - I was referring to all the various options in the autoshutdown plugin (I should have set "settings" to avoid confusion).


    I used the default options and the server never went to sleep.


    I then turned everything off and it went to sleep during a backup.


    What changes can I make, from the default settings, so that the server just goes to sleep when idle for ten minutes?


    I was thinking of turning off IP Range, Sockets and turning on Smart Tests but am not too sure about any of the other settings.

    • Offizieller Beitrag

    what time will it automatically run each day?

    If hourly is greater than zero, then every hour. Otherwise, the daily run will start at 2am I think.

    I am going to give this a go and shall report back.


    I wasn't sure if I could use the WakeAlarm, in the Autoshutdown plugin, for this purpose.

    Just remember that I don't use any of this because I don't put my systems to sleep.

    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!

  • For shutting down my Linux computer I use a simple script like that (will also work in OMV):

    Bash
    #!/bin/bash
    while pgrep -x 'rsync|lftp|dd'; do
      sleep 15m
    done
    shutdown -h now

    It checks every 15 minutes if there is a process called rsync, lftp or dd running. If not then shutdown a computer.

    It has to be run as root or sudo ./scriptname.sh (will ask for password).


    Obviously name or processes listed above and time (15 mins) can be edited for your needs.

Jetzt mitmachen!

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