[Borgbackup] borg-import - use to merge backups?

Marian Beermann public at enkore.de
Thu Dec 6 13:01:34 EST 2018


Am 06.12.18 um 02:39 schrieb Oon-Ee Ng:
> I've been using borg for just over a month now to test it out, and I
> think I'm going to delete my old rsnapshot archives (which go back 2 years).
> 
> Ideally I'd like to convert them to borg archives instead of just
> deleting them, so I just found borg-import[1] which looks like it'll do
> what I need.
>
> However it seems to be geared towards working on an empty repo. How
> would it fare if used on my existing borg repo (which I've been using
> for the past month)? In particular, how would the dating of the archives
> work (is there a way to 'set' the date of an archive to not be the date
> the archive was generated?)?

borg-import creates archives using "borg create". That doesn't impact
existing archives. The timestamp of archives is the mtime of the
snapshot directory.

> Also, I'm going to do some surgery on the rsnapshot archives first. I've
> always hated how the paths were from root, so the snapshot directory
> would have something like
> month.3/mnt/HDD/path/to/actual/folder/through/the/entire/tree, and
> there's some directories I no longer care about that I'll just delete.
> Would such modifications make a big difference to borg-import?

I think it should be fairly straightforward to patch borg-import to have
it do that; it doesn't have an option out of the box.

You can pass excludes to the "borg create" command line, though, so if
all you want is to exclude some parts of the existing snapshots, then
that's no problem.

> Should I, instead of using borg-import, be looking at manually creating
> archives?

borg-import basically automates invoking "borg create" for each
snapshot. So either will pretty much have the same outcome.

Cheers, Marian


More information about the Borgbackup mailing list