PBox Setup with two servers and cross-sync?

typoworx

New Member
May 6, 2025
10
0
1
Hi there,
I'm new to proxmox-backup and now have a remote machine to backup some vps-servers and another instance on my office-server backing up local stuff like book-keeping and time-tracking.

I already was able to setup pull-sync for the remote-pbx to my local-machine. I would also like to sync my local-backups to remote-machine (having cross-sync with backups of both machines mirrored on the other one).

I already tried with exclude patterns in the sync-jobs, but for my sake it's only possible to include/exclude hosts, but not namespaces. My local backups on each machine are group-less stored like <root ns>/host/xyz-machine.

Whereas for remote-pull I created a namespace named like the remote-server (<root-ns>/my-remote-server.com/ ...). At first this looked to work. But later I noticed the push/pull seems to ignore my exclude-pattern, which causes syncing local backups stored on remote back to my local machine in <root-ns>/<ns:my-remote-server.com>/<ns: my-local-machine>/host/xyz-machine -- causing kind of backup loop.

I know it would have been good idea to work with namespace-groups from beginning ... but for my sake I did not! How can I setup/fix this to mirror both backups on both machines keeping the local backups excluded for sync from the other machine (which obvisouly does not need extra copy of them)!?

Is it possible to move existing backups into a namespace like <ns: local-network> or what would be best way to resolve this?
 
Hi,
there is currently no move command, the status for that is tracked by this issue https://bugzilla.proxmox.com/show_bug.cgi?id=6195

What you however can do is setup the PBS host as it's own remote (best via localhost) and create a local pull sync job to sync the root namespace contents by selecting the root namespace and setting the Max. depth accordingly, to only sync that namespace level.

By this you can effectively move the root namespace contents into a sub-namespace on the same datastore. However, be careful to not create recursive loops when doing so. Also, you must then adapt the backup clients to use the new sub-namespace and might require to adapt permissions on tokens and users for the new sub-namespace, depending on you current setup.
 
  • Like
Reactions: typoworx
By this you can effectively move the root namespace contents into a sub-namespace on the same datastore. However, be careful to not create recursive loops when doing so. Also, you must then adapt the backup clients to use the new sub-namespace and might require to adapt permissions on tokens and users for the new sub-namespace, depending on you current setup.
Nice trick. I'll try that and report.