Sync backup starting from latest

mgiammarco

Renowned Member
Feb 18, 2010
165
10
83
Hi,
I am syncing a datastore from two PBSes.
Network is slow so the target pbs is some weeks late because PBS starts syncing from oldest backup.
Can I sync starting from newest backup?
Thanks,
Mario
 
no that's not something thats configurable, but if i may ask, what difference does it make in which order the backups are synced ? the time it takes as a whole won't change
 
When syncing two PBS with a slow network I often prefer to get a few of the most recent backups on the remote side first and then wait for the next backups to keep syncing on the coming days. Optionally I sometimes sync the older ones after the new ones are synced.

As PBS currently can't sync from the newest to the oldest snapshot (nor by a time range), what I do is:

- create a namespace "first_replica" in source PBS
- do full sync of the source namespace to ns "first_replica".
- prune ns "first_replica" and leave a few of the newest backups.
- Sync ns "first_replica" to remote PBS.
- Once it's done, remove replica from ns "first_replica" and configure the replication from the source ns to remote PBS.
- If I want the older snapshots, I would set another sync job to a different ns in remote PBS so it will sync all snapshots.

@mgiammarco , remember that all chunks in a datastore are shared for all it's backups, so this kind of syncing using namespaces within the same datastore requires little space and are done quite fast. Also, most chunks wil be probably shared among newest and older backups, so network traffic will lower the more snapshots you have in remote PBS.
 
no that's not something thats configurable, but if i may ask, what difference does it make in which order the backups are synced ? the time it takes as a whole won't change
It is about disaster recovery, imagine this situation:
- a customer has a local pbs with many backups
- now we add a remote PBS on a secondary site
- we start syncing backups but internet connection is very slow
- now if main site catches fire we need to restore backup on secondary site but unfortunately we are far behind in sync

I suppose I can solve it with namespaces like suggested below.
 
When syncing two PBS with a slow network I often prefer to get a few of the most recent backups on the remote side first and then wait for the next backups to keep syncing on the coming days. Optionally I sometimes sync the older ones after the new ones are synced.

As PBS currently can't sync from the newest to the oldest snapshot (nor by a time range), what I do is:

- create a namespace "first_replica" in source PBS
- do full sync of the source namespace to ns "first_replica".
- prune ns "first_replica" and leave a few of the newest backups.
- Sync ns "first_replica" to remote PBS.
- Once it's done, remove replica from ns "first_replica" and configure the replication from the source ns to remote PBS.
- If I want the older snapshots, I would set another sync job to a different ns in remote PBS so it will sync all snapshots.

@mgiammarco , remember that all chunks in a datastore are shared for all it's backups, so this kind of syncing using namespaces within the same datastore requires little space and are done quite fast. Also, most chunks wil be probably shared among newest and older backups, so network traffic will lower the more snapshots you have in remote PBS.
Thanks I forgot about namespaces and I was worried of internal sync speed.
 

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!