borgbase / vorta

Desktop Backup Client for Borg Backup
https://vorta.borgbase.com
GNU General Public License v3.0
1.98k stars 131 forks source link

Back up to multiple repos from one profile #942

Open m3nu opened 3 years ago

m3nu commented 3 years ago

Then let's start out with multiple repos in one profile. For implementation, the repo-dropdown could have checkboxes, like this:

llcc0

Originally posted by @m3nu in https://github.com/borgbase/vorta/discussions/853#discussioncomment-369636

bastiencyr commented 3 years ago

Hello @m3nu , do you need help for this ? I started implement this option

m3nu commented 3 years ago

Any help is welcome to get improvements launched quicker and eventually add more active maintainers.

Germain67 commented 2 years ago

Any news on this feature, I'd love to have it as I am frequently saving to several HDD at once :)

diivi commented 1 year ago

Should this start with supporting only archive creation with multiple repositories, and then expand to handling other commands with multiple repositories (might need to discuss designs in that case)? here's how Borgmatic works with rlist: image

Vorta could handle this by adding a column to the archive table with the repo name. Or it could use multiple repositories for creating archives and a single repository for all other stuff (select repo in the archive tab to list its archive etc.)

If we end up using multiple repositories for every command Vorta runs, maybe this could also be a good long GSoC task?

real-yfprojects commented 1 year ago

How does borgmatic handle this?

m3nu commented 1 year ago

They just run the same backup command (same source folders) against different repos. In our case it would add multiple BorgCreate jobs. We already have the internal job queue you added some time ago. Would it be enough to add multiple jobs there? May need small changes to specify the repo.

real-yfprojects commented 1 year ago

internal job queue you added some time ago

Actually @bastiencyr implemented it.

Would it be enough to add multiple jobs there?

That should work.

bastiencyr commented 1 year ago

This feature is more difficult to tackle than it looks. You can see my old PR about this feature at https://github.com/borgbase/vorta/pull/1005.

At this time, I didn't have the job queue and I realized that is was nearly impossible to implement this feature without it.

But there are still some issues and considerations to have :

  1. You need to consider the export feature and particularly the import feature. Check the conversation in the PR.
  2. Custom command for backup are added at the profile level for the moment. You need to choose if the command will be made at the profile or repo level
  3. For the archive, you also need to add a combo box to select the repo
  4. You need to add a table in the database (I didn't find other solutions) with all repos. And so you need to migrate the database to match the new schema.
  5. You have to change the stat information about repo size...
  6. ...

I probably forgot some points. All the UX had been made to handle only one repo. Changing this has impact through a lot of parts of the application. So, you need to understand many parts of the code.

Edit : The table in the database permits to perform a many to many relationship. A profile can have many repos and a repos can belong to many profiles. But maybe a one to many relation is enough. In this case the migration is easier.

real-yfprojects commented 1 year ago
  1. For the archive, you also need to add a combo box to select the repo

There are a lot of open questions on how to handle commands other than create with multiple repos. Especially when they are configurable like prune.

  1. You need to add a table in the database (I didn't find other solutions) with all repos.

We already have https://github.com/borgbase/vorta/blob/e0fe766051e521396d7d58f973d1f8002ff749ad/src/vorta/store/models.py#L36

All the UX had been made to handle only one repo.

The user interface might need a complete overhaul for this feature. UX is top priority imo.

P-Jay357 commented 2 months ago

Are there any updates on this?

m3nu commented 2 months ago

As far as I know, nobody is working on it. If you want to suggest a PR, I can assign the issue to you. I still think checkboxes are a decent way to display this in the UI.