Skip to content

Feature request: Support for multiple repositories #4604

@Gnarflord

Description

@Gnarflord

Currently, if we want to secure ourselves against disk failure it's recommended to create two separate borg repositories on separate media and let the client decide where it should push it's backup.
I'd like to add a feature, which lets borg handle multiple repositories without annoying the user with the management aspect.

Some thoughs:

  • When using "borg init" one should be able to give multiple paths for repo creation.

  • "borg create" should have two modes, depending on user preferences:

    • Push the backup to all repositories
    • Push the backup to the repository with the oldest incremental backup. This will result in equal usage of the repos/disks
  • Any other command should work with the most recent backup of course.

This should be fairly straight-forward* by adding a generic handler which chooses the right repos and calls the desired command with it.

The reason I want to add those changes is because it would allow for some broader setups. For example consider three disks with repos, of which two are at all times in the backup server and the third at some secure offline location. Regularly one could rotate the disks and let borg automatically fill the oldest one.

Before I start programming I'd like to ask if this feature is wanted or even makes sense.
Also I'm not quite sure about the syntax yet. It'd be possible to append something like

--repos path/to/repo1 path/to/repo2...

to every command but that'd become quite cumbersome. Maybe save the locations as a repo-config and let every repo be aware of it's sister repos?

Any thoughts?

(*) famous last words

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions