Wake-On-Lan RSync between two OpenMediaVault Servers

  • Hi,

    A little background. I live pretty much on top of a mountain. There is no internet service here (can't wait for StarLink). I use my phone as a hot spot but the speeds are about the same as dial-up (if that on some days). So my option of backing up all my files to the cloud is a pipe dream. My solution that I turned to is OpenMediaVault. I have an OpenMediaVault server in my house with an 8Tb drive attached to it. In the shed cellar I have another OpenMediaVault server on Raspberry Pi 4 with 2Gb of memory with another 8Tb drive attached. I have it in the shed (God forbid) in case of a forest fire. The shed server is using a 25 watt solar panel and battery as there is no power in the shed.


    I have a RSync job setup on my home OpenMediaVault server to run at 2am to back up all files to the shed server.


    Instead of having the shed server on all day long (especially in winter with little sun hours) I thought Wake-On-Lan would be my solution. I'm new to Wake-On-Lan and have read many articles about it in the past two days. It sounds great for what I'm looking to do.


    On the shed server I enabled Wake-On-Lan in the network portion of OpenMediaServer. I use OpenWRT and created a static IP for both OpenMediaServers and updated the network settings on both servers with the static IP's.


    My question:

    I read the man pages on RSync and don't see an option to be able to send Wake-On-Lan command when starting the RSync job; including an option to run a script that perform the Wake-On-Lan.


    Again, I'm new to this. Can anyone provide me with some advice or point me in the right direction on how I can send the Wake-On-Command packets when starting the RSync job at 2am to the shed server?


    Thank you in advance for your time on helping me.


    David

    🏔Salida CO UTC-6 (Mountain, outdoor, and animal lover)

    Python developer, web developer (php, MySQL, WordPress), pilot, and teacher 👨‍🏫.

    Amateur Extra, amateur radio (ham radio) - K0BCJ

    * Please excuse any spelling or grammar mistakes I was born with severe dyslexia.

  • AFAIK the RPi does not support WOL.


    Otherwise you could just start a script on the home server that wakes up the RPI, waits some time to boot it up and start the rsync job.

    If you put a real time clock to the RPi you might be able to start up the RPi at a specific time using the rtcwake command.

  • Ahhh, I didn't realize Rasp dosn't have Wake-On-Lan functionality. Great idea. I'll just stop at ACE Hardware and get a hardware timer.

    Thanks for taking the time to help with my question.

    🏔Salida CO UTC-6 (Mountain, outdoor, and animal lover)

    Python developer, web developer (php, MySQL, WordPress), pilot, and teacher 👨‍🏫.

    Amateur Extra, amateur radio (ham radio) - K0BCJ

    * Please excuse any spelling or grammar mistakes I was born with severe dyslexia.

  • WastlJ

    Added the Label resolved
  • Another option could be to gracefully shut down the RPi with a scheduled job and restart it with a switchable power socket (time switch).

    What an ingenious idea.

    Rsync makes true backup and restoration stupid easy, and it's built right in to OMV. Use this command in a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-NAMEofSOURCEdisk/ /srv/dev-disk-by-label-NAMEofDESTINATIONdisk/
    OMV Version: Ver. 5 (current) - Hardware: NanoPi M4, running Nextcloud, Plex, & Heimdall - Acer Aspire T180, running backup - Odroid XU4, running Pi-Hole (DietPi) - Testing/Playing: Odroid HC2, Odroid XU4, Raspberry Pi 3B+, Odroid XU4, and HP dx2400.

  • Thank you! :) I'll post some pictures as soon as I have it finished. Just waiting for the weather proof container from Amazon to arrive next Tuesday. I added a BME280 sensor to the Rasp Pi to monitor temperature and humidity inside the box. Plus, even when StarLink comes online I'll still be saving about 40.00 a month in cloud storage. And, again when StarLink comes online I can just add NextCloud through Docker if I need access for my files when away from home.

    🏔Salida CO UTC-6 (Mountain, outdoor, and animal lover)

    Python developer, web developer (php, MySQL, WordPress), pilot, and teacher 👨‍🏫.

    Amateur Extra, amateur radio (ham radio) - K0BCJ

    * Please excuse any spelling or grammar mistakes I was born with severe dyslexia.

  • I've done this several ways... both ways short 2 pins on the controller that are connected to the pins on the mobo's PWR pins.


    esp8266, rpi Zero or ATTiny+nRF24.


    Technically, I haven't done what you need to do with the ATTiny+RF24, but knowing that you need good range plus low power because of solar, I have to mention them. I'm using ATTiny+RF24 for lavalier mic's with a certain driver as it's kind of the only DiY realtime audio streaming solution non-techie people like me can achieve (I'll link it below). But while setting that up, I discovered a whole range of power saving options for the RF24 that are useful. In fact, I found a video opposite of the ones I used just for you :-). It's pretty amazing how low the current can go, ultimately you want power down mode.


    Reducing the Power Consumption of the nRF24L01 Transceiver


    Pair that with an ATTiny, and you should be well within the camp of solar friendly. You might be able to use MISO and MSIO directly from the RF24, but I don't know that for sure and I'm surely not the person to make that definitive statement (but it's worth looking into :-).


    And for any of you looking for a cheap way in to real time audio streaming where the latency DOESN'T SUCK...


    https://github.com/nRF24/RF24Audio


    Forgot, the esp8266 *might* also be an option, but the sleep mode (which will save power) can be buggy or flat out broken. If you have enough power for the esp8266, you might want to just skip it and get a esp32. I'm currently working with the 32's and the power consumption seems identical to what the 8266 used to give me for my use cases, even with the extra core.

  • Oh, that’s awesome. I just ordered 2 set transceiver kit with the NRF24L01. And it has SMA antennas which is awesome for my project. That way I can use a SMA cable and place the antenna outside of the enclosure giving me better range. Thanks for the info!!!

    🏔Salida CO UTC-6 (Mountain, outdoor, and animal lover)

    Python developer, web developer (php, MySQL, WordPress), pilot, and teacher 👨‍🏫.

    Amateur Extra, amateur radio (ham radio) - K0BCJ

    * Please excuse any spelling or grammar mistakes I was born with severe dyslexia.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!