execution of command before or when snapshot or replication starts

Status
Not open for further replies.

LastManStanding

Dabbler
Joined
Nov 25, 2014
Messages
48
I have set up a main server and a backup server. The main server take snapshots once a day and starts replication towards the backup server, so far no problem.

The backup server should not run all the time, but only if necessary. I.e., when replication starts or shortly before.

Wake on LAN works fine with wake command, but how to trigger wake command?

My current temporary solution starts waking up backup server by cron job shortly before replication starts. This means that main server must be running at exactly that point in time.

But as I'm currently analyzing when FreeNAS is used mostly and when not, I will also keep the option to shut down server if not needed. This means snapshot taking and replication should not be dependent to a small time slot during the day, it should be done when FreeNas means it can be done... just once a day and totally automated.

Question: Is there a possibility to bind command execution to the snapshot or replication tasks?

Thanks for Your Help!
 

LastManStanding

Dabbler
Joined
Nov 25, 2014
Messages
48
no idea? there must be some information somewhere in the system that leads to execution of snapshot and replication jobs... maybe it's possible to insert some extra code line?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You're free to specify your own snapshot and replication script...
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Sure. The built-in system isn't really intended for lots of hooks.
 

LastManStanding

Dabbler
Joined
Nov 25, 2014
Messages
48
o.k., but cron-job execution again is bound to a time plan... what commands are needed to start snapshot taking by script? do you have command references?

Thanks!
 
Status
Not open for further replies.
Top