Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: More descriptive message when there are no sources. #1463

Closed
real-yfprojects opened this issue Nov 2, 2022 · 6 comments · Fixed by #1613
Closed

FR: More descriptive message when there are no sources. #1463

real-yfprojects opened this issue Nov 2, 2022 · 6 comments · Fixed by #1613
Assignees
Labels
good first issue Simple change to start learning code base help wanted This issue is available, comment if you want to fix it priority:low Nice to have feature, minor improvement to functionality or usability type:enhancement Improvement of an existing function

Comments

@real-yfprojects
Copy link
Collaborator

When the user didn't configure any sources, the message borg: error: Need at least one PATH argument.
Instead vorta should show something a long the lines of Select sources to backup first

@real-yfprojects real-yfprojects added priority:low Nice to have feature, minor improvement to functionality or usability type:enhancement Improvement of an existing function labels Nov 2, 2022
@real-yfprojects real-yfprojects changed the title FR: More descriptive message when sources empty. FR: More descriptive message when there are no sources. Nov 2, 2022
@m3nu
Copy link
Contributor

m3nu commented Nov 2, 2022

Sounds like a good pre-run check. Like checking for an available Borg version.

@real-yfprojects real-yfprojects added good first issue Simple change to start learning code base help wanted This issue is available, comment if you want to fix it labels Jan 2, 2023
@Saiesh-Agre
Copy link

I would like to work on this issue, may you guide me about it, so I could get started?
As I'm relatively new to Open Source, any help would be great.

@m3nu
Copy link
Contributor

m3nu commented Feb 13, 2023

Go ahead! You could add this as pre-run check in borg/borg_job.py which already does some checks to e.g. make sure we have a working Borg binary. Best to outline your plan before coding anything.

@real-yfprojects
Copy link
Collaborator Author

You could add this as pre-run check in borg/borg_job.py

This check should run for borg create only though. So borg/create.py would be a better place.

@diivi
Copy link
Contributor

diivi commented Feb 26, 2023

How can I reproduce this? I tried backing up without a source
image
and without a repository
image

@real-yfprojects
Copy link
Collaborator Author

Good call, it seems like there are a few more steps to reproduce this. You will have to add a second profile and add sources to it. Then try to make a backup with the profile that doesn't have any sources configured.

real-yfprojects pushed a commit that referenced this issue Mar 2, 2023
Fixes #1463. This makes the code count the database rows for the current profile only. 
Previously one could run a backup without any sources when one had sources configured in a different profile.

* src/vorta/borg/create.py (BorgCreateJob.prepare)
ratchek pushed a commit to ratchek/vorta that referenced this issue Apr 4, 2023
Fixes borgbase#1463. This makes the code count the database rows for the current profile only. 
Previously one could run a backup without any sources when one had sources configured in a different profile.

* src/vorta/borg/create.py (BorgCreateJob.prepare)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Simple change to start learning code base help wanted This issue is available, comment if you want to fix it priority:low Nice to have feature, minor improvement to functionality or usability type:enhancement Improvement of an existing function
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants