Proxmox

Proxmox Replication Configuration Beginners Guide

Learn about Proxmox replication and how it helps with data integrity and makes sure of high availability. Learn to config step-by-step.

Proxmox has some really great disaster recovery tools built into the solution, without any add-ons needed or licensing. For instance, it includes a replication feature that allows you to replicate VMs stored on local ZFS storage, to another target node, without shared storage. Let’s look at Proxmox replication and see what it is and how it is configured.

What is Proxmox Replication?

Proxmox replication facilitates the duplication of VM data across multiple nodes within a cluster. This process is integral to maintaining data integrity and ensuring that services remain available even in the event of a node failure.

Why is replication helpful?

Replication has long been a helpful element of a successful disaster recovery strategy since it duplicates your virtual disks from a source host to a target. In the event the source virtual host goes down for whatever reason, the replication task has created the virtual machine or container on the second node and you can start up the virtual resource on the second node.

Advantages of Proxmox replication

It also provides the following advantages for system administrators building their virtualization solution on top of Proxmox:

  • Data Security: It bolsters data protection by creating additional copies of critical VM data across multiple nodes.
  • High Availability: It helps to make sure in the event of a hardware failure, other nodes can immediately take over critical workloads for system uptime
  • Scalability: Facilitates easy scaling of services and data across additional nodes without significant downtime.

Prerequisites for Proxmox Replication task

Proxmox replication is configured based on several key prerequisites:

ZFS Storage

ZFS storage is known for the built-in data protection capabilities that you can take advantage of, nicluding block-level data replication, which is more frequent and accurate than file-level replication, ensuring that all replicated data remains consistent and up-to-date across different storage media.

Configure your vm or lxc container to use a zfs pool for the source storage
Configure your vm or lxc container to use a zfs pool for the source storage

Two Proxmox VE Servers

You can’t replicate your Proxmox VMs to the same node. You need at least two Proxmox nodes when you go to configure the Proxmox replication task. The replication task will replicate the underlying VM storage from the source node to a different node.

You also can’t choose the same storage. You need to have a different storage location you can target with the replication task.

Access to the command line or Proxmox web interface

To set up a replication task in Proxmox, administrators can use the command line tool to specify the source VM, target node, and replication schedule. They can also use the web interface as we will demonstrate below.

Configuring Proxmox Replication

Note the following overview of steps to create a Proxmox replication task:

Step-by-Step Configuration

  1. Select Virtual Machines: Choose which VMs need replication. You choose the VM based on the ID of the virtual machine.
  2. Determine the Target Node: Assign a secondary node where the VM data will be replicated. This node will be the backup in case the primary node fails.
  3. Define Replication Schedules: Using the following command, schedule how often the VM data should replicate to ensure minimal data loss: replicate --vmid --target-node --schedule.
  4. Monitor and Adjust: Continuously monitor the replication process to ensure optimal performance. Adjust the replication parameters as needed based on system load and network capacity.

To begin adding the replication task in Proxmox, navigate to Datacenter > Replication > Add.

01 beginning to add a proxmox replication task
01 beginning to add a proxmox replication task

Select the virtual machine or LXC container ID you want to replicate:

02 select the vm or lxc container id you want to setup for proxmox replication
02 select the vm or lxc container id you want to setup for proxmox replication

Under the schedule drop down list, you will see the various options you can choose for scheduling the replication task to start automatically.

03 set the proxmox replication schedule
03 set the proxmox replication schedule

As you can see below, you can also set a rate limit on the replication task in addition to the other configuration options to minimize impact on the public network.

04 after setting the ct or vm id target schedule and comment
04 after setting the ct or vm id target schedule and comment

A replication job is identified by a cluster-wide unique ID. This ID is composed of the VMID in addition to a job number. This ID must only be specified manually if the CLI tool is used.

05 the proxmox replication job is successfully created and enabled
05 the proxmox replication job is successfully created and enabled

Troubleshooting the Proxmox Replication task

While Proxmox replication is powerful, you may run into the need to troubleshoot when it doesn’t work as expected

  • Managing Network Load: Network resources are saturated. The Proxmox replication task requires a lot of bandwidth for replication. If the network becomes saturated due to Proxmox replication, setting rate limits and scheduling replications during low-traffic periods can help minimize the impact.
  • At least two nodes required: If you get an error about at least two nodes being needed for Proxmox replication, you most likely don’t have more than one node added to your Proxmox data center.
  • Optimizing Storage Usage: Continuous replication can lead to using up available storage. Regular audits and alerting are necessary to manage storage capacity effectively.
  • VM storage is not enabled for replication: You may get an error similar to the “VM storage is not enabled” for replication. This type of error generally points to an issue with ZFS not being provisioned or the VM storage resides on local LVM storage, instead of ZFS.

Next steps

The next steps when you want to get a feel for Proxmox replication is to first make sure you have the prerequisites met:

  • Make sure you have ZFS storage provisioned and you have at least two Proxmox nodes
  • Make sure you have good network connectivity between your source Proxmox host and the target Proxmox host for replication.
  • Verify you have the VM ID or LXC container ID ready for creating the Proxmox replication task.
  • Name the replication task intuitively in the description
  • Test your replication task. Make sure to test your Proxmox replication task before you need to rely on it for disaster recovery.

Download my free e-book for home lab using Promxox here: Proxmox e-book.

Wrapping up Proxmox replication

Replication in general is a great way to bolster your disaster recovery strategy. it helps to satisfy the needs of the 3-2-1 backup best practice methodology as it helps to create multiple copies of your data with at least one copy of the data offsite, if you are replicating to a different data center.

It is great that Proxmox includes the tools in the box with Proxmox VE Server and you don’t have to have a subscription license to take advantage of Proxmox replication. Just keep the prerequisites in mind, including the need to have your VMs stored on ZFS storage and make sure you have more than one Proxmox VE Server added to your Proxmox data center.

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.