Making an existing sync work two-ways -- namespaces?

Colin 't Hart

Renowned Member
Jan 20, 2017
82
14
73
53
Frösön, Sweden
hiawathaavenue.com
Hi,

We have a PBS backup a couple of Proxmox servers in a datacenter. We have another PBS setup at our main office and I configured a sync job on it to sync all the backups off-site. It's configured to sync everything (root namespace).

Now I want to move more of our home-grown backup solution into PBS. In particular, there's a file-server at the office that needs to be backed up, and then synced off-site.

My idea is to backup the office file server to PBS, and then sync that back to the PBS in the datacenter. This will need a second sync job.

I intend to use namespaces for this so that I'm not syncing back and forth (there's no need for that).

If I change my existing sync job to only sync one namespace, does that cause everything to be resynced (like rsync would if you all of a sudden introduce or remove a new directory level)? Or does the namespace remain?

I want to avoid needlessly syncing terabytes of data.
 
Last edited:
I want to avoid needlessly syncing terabytes of data.
You may create a test-setup (with a temporary namespace) with only one small VM and "play" with it...?
 
  • Like
Reactions: Colin 't Hart
sync jobs don't have any separate state besides the config and whats in the datastores on both ends.

so if you move the backups on the source or target one (namespace) level down, and adapt the sync job config to match before it is running the next time, then everything should be fine. the sync job will query both source and target, and then for each group pick up again with the last snapshot that exists on the target side.

you just have to be careful that you adjust the right settings ;) creating a second test datastore and recreating your setup with little data might be sensible.
 
I ran into some similar issues when rearranging our stuff into namespaces. As fabian said, it mostly seems to just compare the source and the destination and the settings and go from there.

I messed up one section by leaving a push sync going after moving some groups on the source but didn't move the existing stuff on the destination before the job ran, so it started working on copying them again.

Lesson learned, I made sure to duplicate my moves on both, and was able to avoid that mess on further moves, as it saw the already existing group chains and just continued working from those