[Borgbackup] conversion from attic to borg

Dan Christensen jdc at uwo.ca
Fri Dec 4 14:02:07 EST 2015


Antoine Beaupré <anarcat at debian.org> writes:

> On 2015-12-04 09:08:55, Dan Christensen wrote:
>
>> Also, how fast is it, with and without the --inplace option?
>
> It's pretty fast! `--inplace` just skips the step where it copies
> (equivalent of `cp -al`) the repository into a backup repo. Once that
> copy is done, it just needs to write a few bytes to every segment, which
> takes at most a few minutes.

It looks like the upgrade processes is changing the files by seeking
into them and writing new bytes.  This doesn't break hardlinks, so the
"backup" copy that is made is also upgraded and is unusable by attic.

But if just about every file in the repo needs to be changed, what point
is there in making hardlinks?  The backup and the upgraded repo aren't
going to be able to share files, so borg will have to either make copies
at the start or break the hardlinks by making new copies of the files
during the upgrade.  It seems cleanest to just make a true copy of the
repo at the start.

(The only advantage of the hardlinks would be if there are substantial
files that can be shared between the repos, but I don't think that's
the case.)

https://github.com/borgbackup/borg/issues/466

Antoine Beaupré <anarcat at debian.org> writes:

> I guess you *could* run the upgrade process multiple times, once per
> client. The server side is "idempotent", that is: it can be run
> multiple times without ill effects, and it will skip work already
> done.

But since remote operation isn't yet supported, this is a moot point.
I'll just run the upgrade on the backup server, and then each client
will have to rebuild their cache the first time.

I guess there could be a "--files-cache-only" option to upgrade
for this use case.

> I don't think `--no-files-cache` is a valid option for the upgrade
> command, but it could be added!

Ah, it is shown in the usage information:

usage: borg-linux64 upgrade [-h] [-v] [--show-rc] [--no-files-cache]
                            [--umask M] [--remote-path PATH] [-n] [-i]
                            [REPOSITORY]

It looks like some of the other things shown might not apply either.

Dan


More information about the Borgbackup mailing list