I have two bit-identical storages (A and B) which I’d like to keep synchronized.
My current method:
- Backup only to A
- Regularly copy all snapshots/revisions from A to B
- Run prune on A and B with the same parameters
The problem comes if (for any reason) a scheduled prune fails to run on one of the storages.
Take this example:
- A and B are synchronized, same ids and revisions
- At the same time each week I run the following prune on each storage: prune -keep 1:7 –keep 7:30
- An internet outage prevents connection to storage B so storage B isn’t pruned
When prune runs the next week it’s running against a different set of revisions on A and B, so the same command (prune -keep 1:7 –keep 7:30) might select different revisions.
Assume A had selected revision 100 as its latest “7:30”
Assume B now selects revision 101 as its latest “7:30”
Assume subsequent prunes on storage B delete the chunks associated with r100
Won’t copy now copy r100 and its associated chunks from A to B, delete them when prune selects r101 instead, then copy them the next time I run copy and forever after?
And if so is there a better way to keep them in sync, maybe leveraging 2-step deletion – e.g. on storage B: prune ALL revisions, then run copy, then the actual prune with check -resurrect somewhere in there?