Jump to content

Backup Unraid to Unraid


Go to solution Solved by danbru1989,

Recommended Posts

How would you recommend backing up one Unraid server to another and vice versa? Duplicacy has done well for me so I was trying to employ that here.

 

Should I backup via sFTP? Should I backup through a server-to-server VPN using the "Disk" option in Duplicacy (if possible)? I heard some rsync setup given as an option too. I'm not really sure what to pursue after putting in a few hours of research.

 

Thanks for your thoughts!

Link to comment
  • 1 month later...
  • Solution
Posted (edited)

Backups between both Unraid servers have been going well for several days. Duplicacy is great...nice UI and reliable from my experience on other setups.

 

My final setup and what I learned:

 

Goal:

Get off B2 to save on expenses. Replace B2 with two Unraid servers backing up to each other in separate geographical locations (home & office). I wanted each server to be running the Duplicacy app to manage the backups.

 

Duplicacy can do backups to many cloud storage services. One option is to a sFTP server...such as our own Unraid server. If you're not familiar with sFTP, it is basically FTP through SSH.

 

Solution:

I configured a server-to-server Wireguard tunnel between the two servers so sFTP could be used without exposing each server's SSH to the internet. Once I verified (via server terminals) that ping and SSH connections were possible between servers, I knew that things were good and I configured Duplicacy for the sFTP backups. The backups have been running great.

 

Steps:

  1. Install the DuckDNS app and set up FQDNs for access to each of your servers through the web. (used for the Wireguard endpoints)
  2. Setup Wireguard VPN tunnel between servers. (see screenshots)
  3. Forward Wireguard ports to your servers at each location.
  4. Test Wireguard tunnel is working by pinging and SSHing both directions by using each server's terminal.
  5. Install the Duplicacy app on each server.
  6. Set up Duplicacy storage locations.
    1. Enter IP address, user, password, and / in the Directory field so you can navigate from the top level.
    2. Click the Folder icon and select a folder in /mnt/user/ that you want to designate as the Storage location.
  7. Sep up Duplicacy backups and schedules.
  8. Run initial backups.

 

 

Tip 1:

Use FQDN for your Wireguard endpoints so your servers can find each other if your public IP address changes. Try DuckDNS if you aren't set up already with a FQDN to your server already.

 

Tip 2:

What's the difference between all the different Wireguard configurations? (Remote access to Server, Remote access to LAN, Server to Server, etc...) It all has to do with the "Peer Allowed IPs" setting in Wireguard. For example, if ONLY each servers IPs are allowed, then you have a "Server to Server" configuration.

 

Tip 3:

You could do sFTP backups without tunneling through Wireguard, but then you will begin to experience hacking attempts as soon as you open port 22 for allowing the SSH (sFTP) connections between your servers. Exposing SSH is highly discouraged because it is only a simple user/password wall between your server and the internet. Eventually, your password can be guessed by bots. For this reason, connect your SSH (sFTP) through Wireguard.

 

home.thumb.png.40dd6d315956e3044eed3a9ae5b0f525.png

 

office.thumb.png.7aa87b7a6372b6352e573e786d261649.png

 

1516703887_Screenshot2024-04-30at12_54_23PM.png.48d9254b67e587a51177b144f9a8c2db.png

 

 

Edited by danbru1989
  • Like 1
Link to comment
  • 2 months later...

Hey, this is basically what I am trying to do as well with two small caveats:

 

- would it be possible to have both servers sync to each other instead of a one way backup? I would love to use both servers and always have them back up to each other

- does Duplicty support versioning and such? I don't wan't to accidentally alter or delete files on one server and have them completely disappear on the other. This is what I really like about Backblaze. I can revert to a version or recover deleted files within (30?) days.

 

Would this be possible with your solution?

Link to comment

If I understand you correctly, your first question is what I am doing. I use both servers to provide unique services, so I need data on both to be backed up. First server backups to the second server and the second backups to the first.

 

Duplicacy is very capable and supports “revisions” which I believe would be to same concept as versioning.

 

The server backups have been running flawlessly on one server. The other server is way under powered and some days I will get some errors because too much is being demanded of the machine at once. This doesn’t concern me too much though right now. I think that some hardware upgrades would do the trick. 
 

In addition to backing up each server to the other using Duplicacy, both also send a weekly appdata backup to B2. 

Link to comment
  • 1 month later...
Posted (edited)

UPDATE – Duplicacy backups are still running flawlessly. I've had to restore a few files and experienced no problems. Duplicacy is great.

 

For macOS clients at each location, I was running Time Machine backups to each server. Then Duplicacy would backup the TM backups to the other server. I found that this put a lot of strain on each server after weeks/months of this setup. All clients were also connected to Nextcloud instances running on the servers. NC is technically a file syncing service and not a backup solution, but with the built-in versioning and 3 month file retention for deleted files, I felt like it qualified as 1 of the 3 backups in my 3-2-1 backup system. I stopped all TM backups and just depend upon Nextcloud syncing client files to the server...which are then included in the server-to-server backups. This a SIGNIFICANTLY reduced my required data storage by over 50%. Both servers are way happier and everything is performing a lot better.

 

I'd be interested in other's thoughts. Thanks!

 

TLDR: I recommend Nextcloud for client "backups" and Duplicacy for server backups. In my situation, it's working very well.

 

 

Edited by danbru1989
added TLDR
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.

×
×
  • Create New...