borgbackup / borgbackup/borg

[Feature Request] Add `--base-archive` to command `create`.

Open
#5,416 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
13.7k
Forks
875
Avg merge
11h 15m
Merged PRs (30d)
192

Description

## What?

Add `--base-archive` to command `create`.

## Why?

Allow incremental updates of existing repositories. Use case: #5413

Extracting a complete borg archive might sometimes be impossible due to space restrictions (and can take forever). Additionally, updating an existing borg archive by partitioning the repository manually (different archives for different source folders) can be a problem as well. These manually crafted partitions can also grow to unmanageable size and in the end, one needs a management of these as well.

A flexible solution (at least to me) is preferred.

## How?

Partial extraction is already possible (`borg mount`, `borg extract`). Partial archive creation isn't.

The idea is to provide a base archive in the repository onto which to create a new version:

```bash
# archive all the pictures, documents and movies
borg create --list /path/to/repo::myfirst ~/pictures/ ~/documents ~/movies
```

```bash
# after a year, backup 2020 pictures
borg create --base-archive myfirst --list /path/to/repo::mysecond ~/pictures/2020-*
```

## Details

Idea in python-pseudo code:

```python
for path in walk(arg.path):
process(path)
for item in base_archive.iter_items():
if itempath no already processed:
new_archive.add_item(item)
```

## Impact

None.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.