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

Throw error on borg<=1.0.x to avoid missing --log-json arg #283

Closed
MrDavidMitchell opened this issue May 13, 2019 · 6 comments
Closed

Throw error on borg<=1.0.x to avoid missing --log-json arg #283

MrDavidMitchell opened this issue May 13, 2019 · 6 comments
Assignees

Comments

@MrDavidMitchell
Copy link

Describe the bug
Trying to run my first backup on with Vorta on Linux Mint - Unable to initialize a new repository

To Reproduce

  1. Started Vorta as a non-root user - version 0.6.19 ( ./home/my_user/.local/bin/vorta)
  2. Repository tab, created a new SSH Key (first time)
  3. Initialize New Repository
  4. Under Repository Path, I selected an empty folder in the home directory to test backup /home/my_user/test_vorta
  5. Entered a password (entered a 9 letter password that I use to log in.)
  6. Fails - log shows

019-05-13 11:04:15,280 - vorta.borg.borg_thread - DEBUG - Using VortaSecretStorageKeyring keyring to store passwords.
2019-05-13 11:04:15,280 - asyncio - DEBUG - Using selector: EpollSelector
2019-05-13 11:04:15,288 - root - DEBUG - Found 0 passwords matching repo URL.
2019-05-13 11:04:15,288 - vorta.borg.borg_thread - DEBUG - Password not found in primary keyring. Falling back to VortaDBKeyring.
2019-05-13 11:04:15,389 - vorta.borg.borg_thread - INFO - Running command /usr/bin/borg init --info --log-json --encryption=repokey /home/my_user/test_vorta
2019-05-13 11:04:15,590 - vorta.borg.borg_thread - WARNING - usage: borg [-h] [-V] ...
2019-05-13 11:04:15,590 - vorta.borg.borg_thread - WARNING - borg: error: unrecognized arguments: --log-json

Desktop (please complete the following information):

  • OS: Linux Mint 18 Cinnamon 64
  • System Python 2.7.12
  • installed - Python 3.7.3

Additional context
Using the borg commands I have been able to create a repository, but I would much rather do this through vorta/gui

My apology in advance if I missed a docs or an existing issue. I reviewed open and closed issues, google, etc. prior to posting this.

@ThomasWaldmann
Copy link
Collaborator

Can you check your borg version? borg -V (in a terminal).

It somehow looks like you have borg 1.0.x there, but vorta wants 1.1.x.

IIRC, vorta bundles borg, but maybe it prefers a borg installed at OS level (== within your linux distribution). So maybe you just need to get rid of the old borg.

@m3nu
Copy link
Contributor

m3nu commented May 13, 2019

This could be a new version-dependent case. I'm guessing --log-json was added after 1.0.x.

@ThomasWaldmann
Copy link
Collaborator

@MrDavidMitchell
Copy link
Author

Thanks guys for responding so quickly! Correct the error occurred with borg 1.0.12

Once I upgraded to the binary version of borg 1.1.9 the problem went away! Thank you! Sorry I missed the version requirements.

For anyone else who runs into this:

  1. Eliminate the distribution version, sudo apt purge borg
  2. Download the binary version of Borg for your operating system from here: https://github.com/borgbackup/borg/releases (official instructions are in the readme.txt file, eg: https://github.com/borgbackup/borg/releases/download/**1.1.9**/README.txt
  3. sudo/root copy and rename the binary, on my filesystem, mv (my_download_location) to /usr/bin/borg
  4. set permissions on the file, sudo chmod +rx /usr/bin/borg
  5. fire up vorta

@m3nu
Copy link
Contributor

m3nu commented May 13, 2019

Since we use --log-json for parsing most Borg logs, Vorta should probably refuse to run on 1.0.x Borg versions.

Reopening to provide a clear error message in such a case.

@m3nu m3nu reopened this May 13, 2019
@m3nu m3nu changed the title Unable to Initialize a New Repository on Linux Throw error on borg<=1.0.x to avoid missing --log-json arg May 13, 2019
@m3nu m3nu self-assigned this May 13, 2019
@m3nu m3nu added this to the v0.6.21 milestone May 24, 2019
@m3nu
Copy link
Contributor

m3nu commented May 24, 2019

Screen Shot 2019-05-24 at 13 01 12

@m3nu m3nu closed this as completed in 85e4d9d Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants