vorta icon indicating copy to clipboard operation
vorta copied to clipboard

Back up to multiple repos from one profile

Open m3nu opened this issue 4 years ago • 11 comments
trafficstars

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

m3nu avatar Apr 08 '21 08:04 m3nu

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

bastiencyr avatar May 30 '21 21:05 bastiencyr

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

m3nu avatar May 31 '21 04:05 m3nu

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

Germain67 avatar Jul 11 '22 15:07 Germain67

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?

diivi avatar Mar 22 '23 15:03 diivi

How does borgmatic handle this?

real-yfprojects avatar Mar 30 '23 18:03 real-yfprojects

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.

m3nu avatar Mar 30 '23 19:03 m3nu

internal job queue you added some time ago

Actually @bastiencyr implemented it.

Would it be enough to add multiple jobs there?

That should work.

real-yfprojects avatar Mar 30 '23 19:03 real-yfprojects

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.

bastiencyr avatar Mar 31 '23 16:03 bastiencyr

  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.

real-yfprojects avatar Apr 01 '23 05:04 real-yfprojects