#118 Multiple repositories with dedicated source_directories in one config

Open
opened 1 month ago by patrick_stronn · 5 comments

If we put source_directories with multiple repositories, each repository will have the same directories backed up, right?

So if I want to have a repository for one thing and another for something else, I must create two config files?

That’s a bit annoying if so

WHy not a:

repositories:
  - path: "/path/to/repo"
    source_directories:
      - "dir1"
      - "dir2"

Note: I don’t exactly understand why there is a list actually for “repositories”, is it to make a backup in different sites?

If we put source_directories with multiple repositories, each repository will have the same directories backed up, right? So if I want to have a repository for one thing and another for something else, I must create two config files? That's a bit annoying if so WHy not a: ``` repositories: - path: "/path/to/repo" source_directories: - "dir1" - "dir2" ``` Note: I don't exactly understand why there is a list actually for "repositories", is it to make a backup in different sites?
witten commented 1 month ago
Owner

If you have multiple repositories listed in a single config file then, yes, each repository will have the same source directories backed up. Here’s the comment/documentation on borgmatic repositories:

    # Paths to local or remote repositories (required). Tildes are expanded. Multiple
    # repositories are backed up to in sequence. See ssh_command for SSH options like
    # identity file or port.

The rationale is that the user may want to create multiple identical backups with different providers for increased redundancy. For instance, one local repository for quick access to files and one remote repository in case the local repository is destroyed. Or just two different remote repositories in different physical locations.

So if I want to have a repository for one thing and another for something else, I must create two config files?

If you mean one repository with one set of source directories, and another repository with a different set of source directories, then yes, you’ll need two different config files right now.

As for your nested repositories / source_directories suggestion, you may want to check out some of the prior discussion on this ticket: #73

Could you say a little more about the issue with multiple configuration files? Is it just that you’d find yourself having to duplicate configuration among them?

If you have multiple `repositories` listed in a single config file then, yes, each repository will have the same source directories backed up. Here's the comment/documentation on borgmatic `repositories`: ```raw # Paths to local or remote repositories (required). Tildes are expanded. Multiple # repositories are backed up to in sequence. See ssh_command for SSH options like # identity file or port. ``` The rationale is that the user may want to create multiple identical backups with different providers for increased redundancy. For instance, one local repository for quick access to files and one remote repository in case the local repository is destroyed. Or just two different remote repositories in different physical locations. > So if I want to have a repository for one thing and another for something else, I must create two config files? If you mean one repository with one set of source directories, and another repository with a different set of source directories, then yes, you'll need two different config files right now. As for your nested `repositories` / `source_directories` suggestion, you may want to check out some of the prior discussion on this ticket: https://projects.torsion.org/witten/borgmatic/issues/73 Could you say a little more about the issue with multiple configuration files? Is it just that you'd find yourself having to duplicate configuration among them?
patrick_stronn commented 1 month ago
Poster

“Is it just that you’d find yourself having to duplicate configuration among them?”

Exactly :P

And thank you for all answers, very clear.

"Is it just that you’d find yourself having to duplicate configuration among them?" Exactly :P And thank you for all answers, very clear.
witten commented 1 month ago
Owner

Thanks.. I think I understand the need now. I’ll have to think through some of the options including the one you suggested. Feel free to add more ideas as well.

Thanks.. I think I understand the need now. I'll have to think through some of the options including the one you suggested. Feel free to add more ideas as well.
patrick_stronn commented 1 month ago
Poster

Offtopic: Are you a teacher irl? you’re so good at explaining stuff, for real, each time I asked here it was a pleasure to read the answer.

Offtopic: Are you a teacher irl? you're so good at explaining stuff, for real, each time I asked here it was a pleasure to read the answer.
witten commented 1 month ago
Owner

Haha, thank you! No, I’m not a teacher. But as a software engineer, I often have to explain features/code to other engineers or stakeholders.

Haha, thank you! No, I'm not a teacher. But as a software engineer, I often have to explain features/code to other engineers or stakeholders.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
Cancel
Save
There is no content yet.