Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Plugin] unRAID Replication

Featured Replies

Looking for some help with the ssh connection. When I test, I am getting the following error 
Error: Can't connect to remote host: "IP"
Error: SSH Exit Status: 255

SSH is enable on both systems and running Unraid 7.0.1

  • 2 months later...
  • Replies 84
  • Views 14k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • keepalived (configuration)   Prerequisites: Fully configured unRAID-Replication plugin with replication tested and working   Tutorial   On the Master server

  • antihero412
    antihero412

    fantastic plugin.  just got it up and running on the new 7.0 beta.  cant wait for more development on this plugin. this was one of the only things i missed from proxmox was replication and now we are

  • It can back up all mapped paths in containers, it is mostly designed to backup Docker and LXC containers (including their paths), I didn't got a lot of feedback so I have moved it down in my list of t

Posted Images

Hi,
Will this Pulgin be further developed? It´s a great tool and absolutely needed for professional environments, but is it still working with 7.13?

  • Author
33 minutes ago, chariman said:

Will this Pulgin be further developed?

I'm very time limited currently but I'll try my best.

33 minutes ago, chariman said:

but is it still working with 7.13

I don't see why it shouldn't work on 7.1.3, this plugin is written in bash and should work in theory for a long time.

  • 1 month later...

I have replication set up, and it works as advertised, but I have some containers on the backup device that I want to remain running at all times. Is there a way we can choose which containers are stopped when control is passed back to the master device?

  • Author
5 hours ago, Raghalis said:

but I have some containers on the backup device that I want to remain running at all times.

No, that's not possible.

May I ask what applications you want to remain running? Are these applications primarily running on the backup server?

14 hours ago, ich777 said:

May I ask what applications you want to remain running? Are these applications primarily running on the backup server?

I'm trying to utilize the backup server as more of a failover with keepalived than a true backup. I have adguard home, telegraf and npmplus installed, and I want adguard home and telegraf to always be running.

I have the same dockers installed on the master server, but I am not replicating adguard home and telegraf, as they are configured specifically for each host.

  • Author
23 minutes ago, Raghalis said:

I'm trying to utilize the backup server as more of a failover with keepalived than a true backup. I have adguard home, telegraf and npmplus installed, and I want adguard home and telegraf to always be running.

I have the same dockers installed on the master server, but I am not replicating adguard home and telegraf, as they are configured specifically for each host.

I think it would be best to run another machine or even a RaspberryPi with keepalived installed for that since the Replication Plugin is not designed to be used like that.

Sorry...

  • 3 weeks later...

Hello,

First, thank you for creating this plugin. I think it can do what I am trying to accomplish but I am not sure.

I want to use keepalived to make my unraid pihole the master and my raspberry pi the backup. For some reason my backup pihole seems to enter the master state and does not stay in the backup state--making my master pihole useless. While I think my keepalived.conf on both devices is setup appropriately, I think my issue was the setup of the Unraid Replication plugin itself (since the instructions are for setting it up with another unraid server only).

Could you please walk me through how to set up the unraid replication plugin so that it properly communicates with the keepalived service on my backup?

Or just point me to an alternative that allows me to use keepalived on my unraid if that is simpler (I have no need for the docker, lxc, and vm replication as I am using a docker container called Nebula Sync for syncing my piholes and it works flawlessly).

The configuration I want:

Virtual IP: X.X.X.100

Master IP (Unraid): X.X.X.99

Backup IP (raspberry pi): X.X.X.98

Unraid Replication plugin configurationimage.png

image.png

Unraid Replicaton - keepalived Configuration

vrrp_instance VI_1 {

state MASTER

interface br0

virtual_router_id 100

priority 101

advert_int 1

unicast_src_ip X.X.X.99 #Unraid pihole's real IP (custom br0 network)

unicast_peer {

X.X.X.98

}

authentication {

auth_type PASS

auth_pass myrealpassword

}

virtual_ipaddress {

X.X.X.100

}

notify_master "/bin/bash /etc/keepalived/scripts/master.sh"

notify_backup "/bin/bash /etc/keepalived/scripts/backup.sh"

notify_fault "/bin/bash /etc/keepalived/scripts/fault.sh"

}


Raspberry Pi - /etc/keepalived/keepalived.conf

vrrp_instance VI_1 {

state BACKUP

interface wlan0

virtual_router_id 100

priority 100

advert_int 1

unicast_src_ip 192.168.6.98 # Raspberry Pi's real IP

unicast_peer {

192.168.6.99

}

authentication {

auth_type PASS

auth_pass bigballs420

}

virtual_ipaddress {

192.168.6.100

}

}


Raspberry pi - "systemctl status keepalived.service" command

admin@pihole-backup:~ $ systemctl status keepalived.service

● keepalived.service - Keepalive Daemon (LVS and VRRP)

Loaded: loaded (/lib/systemd/system/keepalived.service; enabled; preset: enabled)

Active: active (running) since Sun 2025-08-24 10:42:32 EDT; 27min ago

Docs: man:keepalived(8)

man:keepalived.conf(5)

man:genhash(1)

https://keepalived.org

Main PID: 796 (keepalived)

Tasks: 2 (limit: 173)

CPU: 342ms

CGroup: /system.slice/keepalived.service

├─796 /usr/sbin/keepalived --dont-fork

└─797 /usr/sbin/keepalived --dont-fork

Aug 24 10:42:32 pihole-backup Keepalived[796]: Command line: '/usr/sbin/keepalived' '--dont-fork'

Aug 24 10:42:32 pihole-backup Keepalived[796]: Configuration file /etc/keepalived/keepalived.conf

Aug 24 10:42:32 pihole-backup Keepalived[796]: NOTICE: setting config option max_auto_priority should result in better keepalived perf>Aug 24 10:42:32 pihole-backup Keepalived[796]: Starting VRRP child process, pid=797

Aug 24 10:42:32 pihole-backup systemd[1]: keepalived.service: Got notification message from PID 797, but reception only permitted for >Aug 24 10:42:32 pihole-backup Keepalived_vrrp[797]: (/etc/keepalived/keepalived.conf: Line 29) Truncating auth_pass to 8 characters

Aug 24 10:42:32 pihole-backup Keepalived[796]: Startup complete

Aug 24 10:42:32 pihole-backup systemd[1]: Started keepalived.service - Keepalive Daemon (LVS and VRRP).

Aug 24 10:42:32 pihole-backup Keepalived_vrrp[797]: (VI_1) Entering BACKUP STATE (init)

Aug 24 10:42:35 pihole-backup Keepalived_vrrp[797]: (VI_1) Entering MASTER STATE

lines 1-24/24 (END)

As you can see, my Raspberry Pi enters the master state immediately. I do not know how to check the status with the unraid replication plugin. I would greatly appreciate some help.

Edited by dinosaurthug

Wait can I just use a keepalived docker container on my unraid server instead of this plugin to greatly simplify this?

https://github.com/shawly/docker-keepalived

Edit: I did exactly this from above using the Docker Compose Plugin and it worked!
Putting it here so it helps others who may have done this too (probably not becaue I'm new to unraid but you never know haha):

services:

keepalived:

image: shawly/keepalived:latest

container_name: keepalived

network_mode: "host"

cap_add:

- NET_ADMIN

- NET_BROADCAST

- NET_RAW

environment:

- KEEPALIVED_CUSTOM_CONFIG=true

volumes:

- "/mnt/user/appdata/keepalived/keepalived.conf:/etc/keepalived/keepalived.conf:ro"

Just make sure the keepalived.conf is placed at the right spot with proper permissions

I can share my keepalived.conf files if anyone is interested.

Edited by dinosaurthug

  • Author
13 hours ago, dinosaurthug said:

Edit: I did exactly this from above using the Docker Compose Plugin and it worked!

I would rather recommend that you use LXC for that since it‘s way easier to set up.

There are even premade containers out there which are working just fine for what you are wanting to do and I have the exact same setup as you have but only with a combination from a LXC container and a RockPi.

https://github.com/ich777/unraid_lxc_pihole

8 hours ago, ich777 said:

I would rather recommend that you use LXC for that since it‘s way easier to set up.

There are even premade containers out there which are working just fine for what you are wanting to do and I have the exact same setup as you have but only with a combination from a LXC container and a RockPi.

https://github.com/ich777/unraid_lxc_pihole

Oh wow this looks amazing, thanks for this suggesion. Unfortunately, I being a noob know very little about LXCs and I see that this script uses gravity sync which I think is outdated comparted to nebula sync which supports v6? I am going to err on the side of caution and just stick with my install I talked about above that works for me.

  • Author
2 hours ago, dinosaurthug said:

Oh wow this looks amazing, thanks for this suggesion. Unfortunately, I being a noob know very little about LXCs and I see that this script uses gravity sync which I think is outdated comparted to nebula sync which supports v6? I am going to err on the side of caution and just stick with my install I talked about above that works for me.

LXC is just a container, like a VM, with shared resources, you set one up and it basically acts like a VM but with shared resources like Docker, I don't know if maybe @Mainfrezzer has a newer container archive available than me.

  • 2 months later...
On 8/4/2025 at 2:36 PM, ich777 said:

No, that's not possible.

May I ask what applications you want to remain running? Are these applications primarily running on the backup server?

is there still no solution to keep application that is already running on backup server to remain running?

Edited by Kira

  • Author
10 minutes ago, Kira said:

is there still no solution to keep application that is already running on backup server to remain running?

No, I haven't been able to develop the plugin any further.

On 10/28/2025 at 5:41 PM, ich777 said:

No, I haven't been able to develop the plugin any further.

Thank you for this wonderful app

For anyone who needs to keep specific Docker containers running on a backup server, I found a solution: I modified the backup.sh file.

After the script stops all containers, I added a docker start (name) command for each essential container. This instantly restarts them. Be aware that this approach is hardcoded—you'll need to repeat the docker start (name) line for every container you want to restart.

  • 1 month later...

Just wanted to say thank you for this plugin. It makes it much more possible to use unraid as a cloud replacement as you don’t need to worry about downtime in the same way.

Currently running 2 machines connected over tailscale in different locations.

I was having issues where the extra parameters on my docker containers weren’t being applied to the dockers on my backup server. I fixed this by having a user script on the host machine initiate the replication and then once it is done it force updates all the docker containers on the backup server.

Also Is there a way to delete orphaned files on the backup server? Would be nice to have the option, especially if i ever need to replicate back the other way.

Thanks again for an amazing plugin.

Edited by berger321

  • Author
6 hours ago, berger321 said:

Also Is there a way to delete orphaned files on the backup server?

User Scripts has a Schedule build in, which is deactivated by default, to prune all unused images.

Maybe enable that on the Backup server to remove those images on a daily basis.

That would be the easiest way.

15 hours ago, ich777 said:

User Scripts has a Schedule build in, which is deactivated by default, to prune all unused images.

Maybe enable that on the Backup server to remove those images on a daily basis.

That would be the easiest way.

Thanks for that! Using it now for my docker images.

Is there also a way to remove just remove ordinary files? For example if i have a movie on the host server that I delete, is there a way that I can get it to delete on the backup server.

  • Author
16 hours ago, berger321 said:

Is there also a way to remove just remove ordinary files? For example if i have a movie on the host server that I delete, is there a way that I can get it to delete on the backup server.

Sadly no, at least not how it's currently implemented.

I could add --delete to the rsync command but that would affect all users.

On 12/11/2025 at 1:43 AM, ich777 said:

I could add --delete to the rsync command but that would affect all users.

Maybe there could be the option to add the —delete command on some runs or just as a once off to clear out the excess files?

  • 3 weeks later...

Hello! I've just installed this on my primary and backup Unraid servers and executed my first successful replication. This plugin is great!

I'm struggling to understand the keepalived section. It seems to be written for only a single virtual IP, but my replicated services are br0 network type with their own IPs on my network - I'm replicating piHole at 10.1.20.4 and Nginx Proxy Manager at 10.1.20.5.

How would I set up keepalived for multiple virtual IPs? Is that possible with this plugin, or is it assumed that you're to use "host" network type for all services?

On 6/4/2024 at 9:47 AM, ich777 said:

With that you have now configured keepalived and you should now be able to reach your services (if they are running on the default or custom bridge from Docker without a dedicated IP on the physical interface) with your virtual IP address - in my case 10.0.0.18 (for example binhex-jellyfin) :

Is there a means to do with for containers with dedicated IPs?

  • Author
15 hours ago, VanGoghComplex said:

I'm struggling to understand the keepalived section. It seems to be written for only a single virtual IP, but my replicated services are br0 network type with their own IPs on my network - I'm replicating piHole at 10.1.20.4 and Nginx Proxy Manager at 10.1.20.5.

Yes and no, you would have to install or at least get a container with keepalived installed in it but since this can get very complicated with Docker I wouldn't recommend that, you would basically set up a vritual IP for each service and the real IP where you point the devices which should use PiHole for example to the virtual IP, with that keepalive and all devices would switch seamlessly between your Servers if one goes down.

However as said this can get really hard or at least complicated with Docker since you need a container with keepalive built in and started and configured.

I for example nowadays use a RockPi with keepalived (which runs also a KVM for my Server, my MQTT Server, Zigbee 2 MQTT and the failover instance for my PiHole) and on my Server I run PiHole in a LXC container with keepalived and they both have the virtual IP address 192.168.0.200 (from keepalived) which all my clients get from my DHCP Server and if my main Server goes down PiHole from the RockPi seamlessly kicks in and ensures that I have no issues with DNS at home.

But with the replication plugin it should work just fine because the plugin just clones the containers from the main machine and if configured the containers will start when keepalive detects that your main server goes down, that means the containers which where cloned should start with their IPs from the main machine (if the Docker networks and networks in general are configured in a similiar way so that the containers can actually start).

Oh... oh! Okay, so the keepalived virtual IP is required for keepalived to function in detecting a primary server failure, but that IP isn't necessarily used to access services (unless they're host type network containers that you're also replicating) - is that right?

Sorry, I got tangled up in virtual IPs and my old HSRP knowledge tainted my understanding of this. 😂

Will try it out today!

  • Author
2 hours ago, VanGoghComplex said:

Okay, so the keepalived virtual IP is required for keepalived to function in detecting a primary server failure

Yes and no.

Since keepalived will detect when the MASTER goes offline a script will be triggered on the SLAVE which basically starts the containers (if configured) and the same is true for if when the MASTER comes back online the keepalived will also detect that and stop all containers on the SLAVE.

The virtual IP would come in handy if you have services running on the bridge which you access usually through your server IP but you can do that then with the virtual IP and keepalived will switch between your MASTER and SLAVE server on that IP automatically depending which server is online.

2 hours ago, VanGoghComplex said:

but that IP isn't necessarily used to access services

True, but that's not an issue here, I think you are overthinking it all a bit. :)

If you configured the container that it has it's own IP then it will run on the SLAVE exactly like on the MASTER with the same IP that you've configured it there.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.