Server to Server Backups Push VS Pull


gzibell

Recommended Posts

I followed this https://unraid.net/blog/unraid-server-to-server-backups-with-rsync-and-wireguard skipping the wiregaurd portion as my servers both live locally.  (Short version I had a 2nd unraid license and equipment to setup another server so figured I'll use it for important data backup.)  Working great!

 

So Rsync is currently running on server A pushing files over to Server B.  But I was thinking, since server B will be powered down most of the time and only up for say monthly backups, maybe I should setup site B to "pull" files from site A.  Then I could schedule this script to run at array startup aka when I powered on Server B.  Trying this without any changes resulted in an error so I assume I would have to re-do the ssh portion of this article the opposite direction so Server A allows Server B to access it.  

 

But, then I was thinking and since I am no expert on any of this, would there by any inherent security risk of giving Server B unattended SSH access to my primary server A?  Since they both are still local and behind my firewall I imagine the answer is no, but if I eventually moved Server B offsite out of my physical control would that change?  

 

Just curious at this point.  It is not that big of a deal to power up Server B and kick off the script on Server A. Really it would just save one step. lol

Link to comment
23 minutes ago, gzibell said:

So Rsync is currently running on server A pushing files over to Server B.  But I was thinking, since server B will be powered down most of the time and only up for say monthly backups, maybe I should setup site B to "pull" files from site A

I am pushing from A to B and B is powered down until time for a backup.  This is all automated and I do not have to do anything at all manually.

 

The caveat here is my backup server (B) has IPMI so it can be powered on remotely by the backup script running on server A before it starts pushing files from A to B.  It then powers the server off after backup.

 

Before I put an IPMI MB in that server, I was doing the same thing but with S3 sleep on a non-IPMI board.  The script woke up the backup server and then put it to sleep again when the backup completed.

 

Mine are both on the same LAN as well but I will eventually move the backup server B offsite and do this over WireGuard.  Others have done it with ZeroTier which also works very well.

Link to comment
24 minutes ago, Hoopster said:

I am pushing from A to B and B is powered down until time for a backup.  This is all automated and I do not have to do anything at all manually.

 

The caveat here is my backup server (B) has IPMI so it can be powered on remotely by the backup script running on server A before it starts pushing files from A to B.  It then powers the server off after backup.

 

Before I put an IPMI MB in that server, I was doing the same thing but with S3 sleep on a non-IPMI board.  The script woke up the backup server and then put it to sleep again when the backup completed.

 

Mine are both on the same LAN as well but I will eventually move the backup server B offsite and do this over WireGuard.  Others have done it with ZeroTier which also works very well.

S3 Sleep interesting.   Was that using the Dynamics plugin or something on the MB specifically. If you could share the script needed to wake up/shutdown via S3 that would be awesome!

Link to comment
24 minutes ago, gzibell said:

Was that using the Dynamics plugin or something on the MB specifically.

The MB and NIC have to support sleep/wake and some do it better than others. 

 

The plugin can't be called from a script.

 

I used direct wake commands to the MAC address of the NIC.

 

I believe I used Etherwake to wake it up and something like 'echo -n 3  > /sys/power/state' to put it to sleep.

 

It has been years, so I could be fuzzy on that.

 

A few Google searches ought to turn up something.

 

S3 sleep is touchy stuff and doesn't work well on some hardware.

Edited by Hoopster
Link to comment
  • 2 months later...
On 11/3/2020 at 9:29 PM, Hoopster said:

I am pushing from A to B and B is powered down until time for a backup.  This is all automated and I do not have to do anything at all manually.

 

The caveat here is my backup server (B) has IPMI so it can be powered on remotely by the backup script running on server A before it starts pushing files from A to B.  It then powers the server off after backup.

....

Hi,
sorry that I hijack this thread.
I want to do exactly the same. 
I have 2 Servers, on the same network. And my goal is to backup some folders from A to B on a weekly bases.
So A should power on B and when the backup is done it should power off B. (B has IPMI)
Can you maybe give me a hand how to set this up?

Thanks in advance

Link to comment
11 minutes ago, Cornelius said:

I want to do exactly the same. 
I have 2 Servers, on the same network. And my goal is to backup some folders from A to B on a weekly bases.
So A should power on B and when the backup is done it should power off B. (B has IPMI)

My script is located in this link.  ipmitool is part of the nerd pack plugin and this what I use to power on the backup server and power it off when the backup ends.

Link to comment
  • 2 weeks later...
13 minutes ago, RockDawg said:

@Hoopster I see you use a parity drive on you backup server. Since it sleeps when not backing up, when does it perform a parity check?

Every once in a while I will run a manual parity check on it. 

 

I  have a parity drive in it only because in the event of real problems on the main server, the backup will become the main server while troubleshooting.  I want to be able to recover a disk should it fail.  A couple of disks in the backup server are older former main server disks so they have some age on them.

  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.