Handling Share Replication

Hello,

I am using a Rockstor Server for my important data.
I have setup an old (2nd) PC as a “share replication” for Backup.

I have paired the two machines and replication works.

However:
I only found a way to define a fixed time for replication; I would like to start replication on my own (preferrably from the command line via some bash script).

My questions:
is there a way to start the replication task from the command line instead of a fixed time?

Is there any way (on both sides) to check whether a replication task is running?

For the replication-Slave, when replication is finished I want to shutdown the machine. I want NOT to waste energy to continously run this machine. In addition, the data is “more save” while the machine is switched off.

Same for the replication-Master: if it is not in use for some time, it puts itself into sleep; however I want to delay this while a replication task is running.

Any idea, how I can do this?
Is there any better way to do backups?

Thanks,
Joe

I use this bash script to replicate to a second rockstor. Uses native btrfs send\receive commands. Works well. I posted further details of this setup here. Yes can schedule script to run using cron.

As for monitoring, if you’ve set up Rockstor email alerts you’ll be notified when script finishes. Plus, in ssh, iftop gives a good graphical illustration of which network hosts your nas is communicating with. The btrfs process will be using cpu during replication.

Could add final line to script to run remote command to shutdown (shutdown -h now). How to power back up automatically is the problem (for me anyway - I won’t physically be at remote location).

Thanks a lot for this script!

It took a while to understand it (I always try to understand what I am doing…)
So far, it seems to work quite well!

Thank you very much!
Joe