[Borgbackup] Issues starting a new repository by cloning an existing one

Luc Maisonobe luc at spaceroots.org
Thu Mar 2 16:13:49 EST 2017


Hi all,

I encounter some issues with a probably not frequent use case.

My ultimate goal is to have two backup servers at distant locations,
in order to mitigate site disaster (say a fire in my house where one
server is, or simply a theft). I started creating the repository on
a small server locally, on the same local network as the clients, so
there are no bandwidth problems. This works well.

Then I attempted the second phase of my setup, with a remote server
hosted 60 kilometers away, in a place where I cannot go very easily
(it is far, I have to plan the visit with the guy responsible of the
room ...). As I was learning to use borg and experimenting at the same
time, it was not practical to go and copy data every day. So I decided
to simply do everything remotely, and mainly experiment with borg
locally and rsync the local repositories at my (slow) internet
connection rate. From the beginning, this was intended only as a 
temporary setup, as borg FAQ recommends to use borg create directly
with each server rather than copying the repositories. Also as I
noticed that when a repository is copied and then used from the new
location, it keeps emitting warnings about location change, so copy
would indeed be inconvenient on the long run.

As the first backup involved almost no deduplication, it was huge. The
rsync was therefore split in several days. In fact, given the reduced
bandwidth of my internet access, it took between one and two weeks to
complete.

Then, I had my two servers with identical data. I could therefore stop
doing the rsync and start using borg twice, as per FAQ recommendation.
However, I kept getting errors about "Cache is newer than repository -
this is either an attack or unsafe (multiple repos with same ID)". This
seemed odd to me as the repositories are really identical at this step
and all machines are synchornised to UTC using NTP.
I did a last backup at home and a last rsync to be sure, but still got
the problem. It was not a simple warning, it really aborted the backup.
I finally succeeded, after several attempts, so now everything is fine.

However, I wonder if this use case is really supported: starting a
repository by first cloning an existing one and later on having both
repositories live their own independent lifes. What is this repo ID?
Is there a way to change it if one considers it is bad practice to
have different repositories with the same ID (even when they are on
different servers at different locations)?

best regards,
Luc


More information about the Borgbackup mailing list