Syncing multiple unraid servers?


hermy65

Recommended Posts

Probably not the right place to post this but im not sure where else to put it.

 

I have 2 unraid servers, one is my main machine and the other is more of an archive machine located at another location that has irreplaceable data. Im looking for a way to keep the two machines in sync so that if something new gets added to a archive specific directory on my production machine it can sync over to the archive machine. Any suggestions on how to automate this whole thing?

Link to comment

I actually do this very thing myself. For a long time I had both my main and backup server in the same house (literally a foot away from each other) so a simple rsync worked just fine. However now that I've moved my backup server to an offsite location, I use a docker called Resilio. Resilio on the primary server indexes whatever folders I choose to pass through and copies them to my backup server's instance of Resilio, again to whatever folders I choose. It took a bit to set up, and the initial index takes a while (especially if you have tons of file, pictures for example) but now that it's set up it works really well.

Link to comment

You could also try the Syncthing docker.  I have used it between two servers and it works; however, for my needs, I prefer simple scripted rsync commands.  Since I only care about the data going one way (main server to backup) and I am only copying new files from six users shares on one server to the same user shares on another rather than keeping things in sync (not removing deleted files from backup), rsync works great.  The scripts turn on my backup server via IPMI, copy the files and then turn off the server.  Eventually, I may move the backup offsite, but,  can see the thread below about how one user manages copying data between servers over SSH via the Internet.  I modified his scripts for my purposes.

 

 

Edited by Hoopster
Link to comment

Since your secondary (backup) server is at a different location, that makes me wonder if it's usually powered off? If so, you might find it easiest to just create a cron job to execute a simple shell script that involves wakeonlan and rsync.

 

For now, I open a `screen -S share_name` and rsync one share, open another screen and do a second share. I've asked for guidance on the best rsync options to use but didn't seem to get much of an answer, perhaps because it might be more tailored to each person's needs. For example, how you handle symbolic links.

 

This is what I use once in screen on the primary (newer server) to backup `rsync --verbose --human-readable --recursive --update --copy-links --copy-dirlinks --times --perms --xattrs --owner --group --devices --specials --prune-empty-dirs --stats --log-file=/mnt/cache/rsync-logfile-ArrayTV.txt /mnt/user/TV/* root@<Backup_Server_IP>:/mnt/user/TV`

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.