All of a sudden most of our borg backups shows this message at the begin of backup:
Synchronizing chunks cache...
Archives: 16, w/ cached Idx: 16, w/ outdated Idx: 1, w/o cached Idx: 1.
Reading cached archive chunk index for 2019-10-20_05:55 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-08-31_05:02 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-10-18_05:24 ...
Merging into master chunks index ...
Fetching and building archive index for 2019-10-23_05:21 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-09-22_05:47 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-10-22_05:34 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-06-30_05:07 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-10-06_05:03 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-10-19_05:52 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-10-17_05:26 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-09-30_05:09 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-10-13_05:05 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-07-31_05:39 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-09-29_05:12 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-05-31_05:50 ...
Merging into master chunks index ...
Reading cached archive chunk index for 2019-10-21_05:09 ...
Merging into master chunks index ...
Done.
Then the archive is done properly. borg check is okay.
This happend when we startet purging the repositories with a separat process (on a separat time).
This is a bit annoying and irritating - could someone explain what happens?
Likely a different borg client is (write/delete) accessing the same repo.
Can be: different machine, same machine + different user, same user + different cache-dir.
Yes, it affects only machines backing up from remote machines - exactly since we purge locally on the backup server. Remote backups are done with user borg. That's why we call borg prune in script like this: /sbin/runuser borg -c "borg prune ${BORGPARM} ${REPOSITORY}. Files in the repository are consistently owned by borg. .cache/borg files are owned by root.
Where could we change what to fix it?
If you backup on one machine and purge on another (backup server), this is expected.
The cache needs to be consistent with the repo and if 2 different parties are modifying the repo then e.g. party A is modifying the repo and party B needs to resync to get its cache consistent again.
Either live with it or let only one party access a repo.
Understand. I think we should change the strategy to purge from the remote machine. Thank you!
If your repo were encrypted and your backup server not really trusted, you could not run prune on the server anyway.
You're welcome!
Also, sometimes one uses different archive name prefixes and wants to prune them differently.
Then it makes sense to prune in the same script where the backup is also done, for better consistency.
Most helpful comment
Likely a different borg client is (write/delete) accessing the same repo.
Can be: different machine, same machine + different user, same user + different cache-dir.