(Wake > Backup -> Sleep) Repeat

  • Hi,
    I'm seeking advice on how best to implement a NAS backup process. I have an existing ReadyNAS that I would like to periodically backup with my PC based OMV box. Ideally I would like this to be totally autonomous where the OMV box is usually sleeping. Once a week or so I would like for it to wake, then search the ReadyNAS for any changes and update its database to keep it current. After that I would like for the OMV box to then go back asleep, waiting for the next wakeup event to repeat the same sequence.The intention here is to have a backup that is mostly offline and untouchable by any malware, ransomware or whatever that can be used to restore my systems in the event of an infection.


    Any advice on how to implement this?


    Thanks very much!

  • Wake > Backup -> Sleep

    Wake: Send WOL packet from another PC or use hardware clock BIOS function (if available) to wake up the OMV Nas
    Backup: Several possibilities:

    • omv urbackup-server plugin (don´t know if a client für ReadyNas is available)
    • own script using rsnyc
    • omv rsnapshot plugin

    Sleep: autoshutdown plugin

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

  • Thanks for the reply cabrio_leo.


    I'm not really liking the idea of depending on another machine to issue the WOL packets. It assumes that the sending machine will be on all, or, most of the time. Id rather the OMV machine woke and slept on its own after doing the backup.


    What about rtcwake? That would do both jobs of waking and sleeping the OMV machine for a set amount of time. This issues I see with that are the fact that it will have to be a CLI script that does the following:


    • At wake, fire up the backup job.
    • Wait for when the job has finished.
    • execute rtcwake again to schedule the next wakeup
    • Repeat.

    I'm not much of a script kind of guy but I should be able to muddle my way though something that would do this job. If this is the case then here are my questions for the OMV box:

    • How does one execute a script at startup?
    • How does one execute a script at wake from sleep?
    • Once the script has executed the backup process (such as, but not limited to, rsync) how does one know that the plugin has completed its task so that rtcwake can be run to prepare for the next wakeup.
    • How do I get this to loop forever?
    • What backup plugin would be most appropriate for this application?

    Thanks!

  • It assumes that the sending machine will be on all, or, most of the time.

    As I understand you want backup the ReadyNAS System. Then this system could send the WOL packet to the OMV NAS, because of course it must be online if you want make the data backup .

    What about rtcwake?

    I don´t know it. Maybe it is usefull to start the OMV Box. But for shutdown I would always use the autoshutdown plugin, because you have a lot of options to control the shutdown process (cpu activity, network traffic ecc.) So I think this is more flexible and you don´t need a script for shutdown via rtcwake. You can also monitor if a certain process is running.



    How does one execute a script at startup?

    I think there should be an option in the scheduled jobs to execute a job once at startup.

    How does one execute a script at wake from sleep?

    If you use the OMV NAS only from time to time for backup purposes I would recommend to do a full shutdown after the backup job, no hibernation. It´s not necessary to have the OMV Box available immediately.

    Once the script has executed the backup process (such as, but not limited to, rsync) how does one know that the plugin has completed its task so that rtcwake can be run to prepare for the next wakeup.

    Please look what I wrote at "What about rtcwake?".

    What backup plugin would be most appropriate for this application?

    In my first reply I have listet several applikations and omv plugins which you should take a look at. The differences lie in detail and it depends from your personal use case.

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

    Einmal editiert, zuletzt von cabrio_leo ()

  • Removed because of forum double post

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

    2 Mal editiert, zuletzt von cabrio_leo () aus folgendem Grund: Removed because of double post

  • You mentioned in one of your previous posts to this thread in the list of backup options that one could write "own script using rsnyc". How does one execute sync from a script? Is there information on the CLI options for rsync?
    Really do appreciate your help cabrio_leo.

  • How does one execute sync from a script? Is there information on the CLI options for rsync?

    Hi @Fylb I´m no scripting specialist. But in the past I did a little bit of googling for that topic. There can be many post found using rsync for that purpose, also in the other forums of nas4free or freenas. With small adaptations there can be used also for omv.

    OMV 3.0.100 (Gray style)

    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1) - Fractal Design Node 304 -

    3x WD80EMAZ Snapraid / MergerFS-pool via eSATA - 4-Bay ICYCube MB561U3S-4S with fan-mod

Jetzt mitmachen!

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