How to use two PBS servers for backup in case of first server going down and I need to use the second PBS

greavette

Renowned Member
Apr 13, 2012
163
9
83
Hello Team,

I've setup two PBS servers in our office. PBS01 is my primary and I'm backing up to this server daily. PBS02 is my secondary server and it sync all backups from PBS01 on a regular schedule throughout the day.

To each VM I've added a backup storage for PBS01 and PBS02.

I did a test whereby I wanted to backup data to PBS02. This is to mimic the situation where PBS01 goes down hard and I can't get it back online quickly. So to keep my backups going I want to switch my backups to PBS02. When I did a backup test directly to PBS02 I received the following error:

Code:
ERROR: Backup of VM 106 failed - command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- /usr/bin/proxmox-backup-client backup '--crypt-mode=none' pct.conf:/var/tmp/vzdumptmp21585/etc/vzdump/pct.conf root.pxar:/mnt/vzsnap0 --include-dev /mnt/vzsnap0/./ --skip-lost-and-found --backup-type ct --backup-id 106 --backup-time 1601250658 --repository pbs-u@pbs@10.101.10.21:pbs02' failed: exit code 255

  1. Can't I backup to either backup server?
  2. What is the proper procedure to use when my first (primary) backup server is down and I need to switch to my secondary backup server?

Thank you.
 
Thank you @fabian for pointing me to these two bugs. I do hope that Proxmox allows us to easily switch our PBS if disaster befalls our primary server.

Hello @crmspezi , thank you for your reply. Interesting solution to create a second Datastore. But how do you migrate your backups from the primary datastore to the second one? Or do you start backing up the secondary Datastore and then over time just delete the primary datastore as those backups age and become unusable?

Thank you.
 
Hallo Greavette,
der 2. Datastore auf dem 2. pbs dient ausschließlich der Sicherung im Notfall, wenn der 1. pbs nicht verfügbar ist. Im 1. Datastore des 2. pbs ist im Normalfall immer eine Kopie des 1. pbs.

Wenn der 1. pbs für immer ausfällt, schreibe einfach die Konfig um. Das sollte kein Problem sein.
 
  • Like
Reactions: greavette
Thank you @crmspezi , really appreciate your responses to my questions.

I see your point in that the second datastore on PBS02 becomes my new primary datastore that I backup too while my PBS01 datastore is not avaialble. If for some reason I'm not able to recover my PBS01 server and my PBS02 server needs to be my new primary, where is the config that needs to be rewritten and what are the changes that need to be done in this config? Is there documentation on how to do this?

Thank you.
 
Hallo Greavette,
ich schreibe in deutsch weil mein englisch schlecht ist. Bitte entschuldige. Es ist aber nicht schwer.

Bitte ändere die Config in: /etc/pve/storage.cfg

### Examble

pbs: pbs01
datastore ZFSDATA
server pbs01.server.de
content backup
fingerprint fe:8d:87:c6:1d:72:c8:95:4c:42:bd:0f:9d:52:38:d1:59:f2:34:20:4c:53:1d:b2:7d:06:9c:21:ae:8e:ef:b9
maxfiles 4
username root@pam

pbs: pbs02
datastore ZFSDATA-2
server pbs02.server.de
content backup
fingerprint 1d:25:33:f0:db:70:45:c9:66:fa:8b:94:e7:af:b5:8d:f8:d5:21:f6:7b:ab:f2:8a:5e:e0:5d:27:5f:fe:6d:73
maxfiles 4
username root@pam

###

Mehr must Du nicht tun.
 
Last edited:
  • Like
Reactions: greavette

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!