borgbackup / borg

Deduplicating archiver with compression and authenticated encryption.
https://www.borgbackup.org/
Other
10.84k stars 734 forks source link

borg: error: unrecognized arguments: --keep-security-info #6882

Closed kntasks closed 2 years ago

kntasks commented 2 years ago

Hardware: HP Pavilion Gaming - 15-ec0050ax

filesystems used: ext4

When I attempt to run:

borg delete --keep-security-info /media/data/backup/borg/

I'm presented with:

borg delete --keep-security-info /media/data/backup/borg/
usage: borg [-V] [-h] [--critical] [--error] [--warning] [--info] [--debug]
            [--debug-topic TOPIC] [-p] [--log-json] [--lock-wait SECONDS]
            [--bypass-lock] [--show-version] [--show-rc] [--umask M]
            [--remote-path PATH] [--remote-ratelimit RATE]
            [--consider-part-files] [--debug-profile FILE] [--rsh RSH]
            <command> ...
borg: error: unrecognized arguments: --keep-security-info

The above command and switches/options are from the official borgbackup.readthedocs.io website. Here is the link:

https://borgbackup.readthedocs.io/en/stable/faq.html#faq-corrupt-repo

Any ideas or clues?

ThomasWaldmann commented 2 years ago

Tried with 1.2-maint branch:

(borg-env) tw@mba2020 borg % borg init -e repokey repo12
...

(borg-env) tw@mba2020 borg % borg delete --keep-security-info repo12
Enter passphrase for key /Users/tw/w/borg/repo12: 
You requested to completely DELETE the following repository *including* 0 archives it contains:
------------------------------------------------------------------------------
Repository ID: e95002327edeeadd3bd919b1c21b71b053db6789d4b9304d2942578054649b61
Location: /Users/tw/w/borg/repo12
------------------------------------------------------------------------------
Type 'YES' if you understand this and want to continue: YES

So "works for me", using borg 1.2.2pre.

ThomasWaldmann commented 2 years ago

And it also works for me using 1.2.0, so not sure what's going wrong for you.

ThomasWaldmann commented 2 years ago

Are you maybe (accidentally) using 1.1.x? What does borg -V say?

kntasks commented 2 years ago

I uninstalled then re-installed. See my post: https://github.com/borgbackup/borg/issues/6852#issuecomment-1191116385

within the Vorta GUI it says: 1.2.0 /app/bin/borg

However, if I use a terminal and do: borg -V

Output is: borg 1.1.17

I just tried the command (even after reinstall) and it's the same:

borg: error: unrecognized arguments: --keep-security-info

infectormp commented 2 years ago

please show output for this commands: /app/bin/borg -v wich borg

kntasks commented 2 years ago

'please show output for this commands: /app/bin/borg -v wich borg'

For: /app/bin/borg -v

output: bash: /app/bin/borg: No such file or directory

so I navigated to ~/.var and did: ls

output: com.borgbase.Vorta com.borgbase.Vorta.old

when I 'cd' to 'com.borgbase.Vorta' and do: ls

output is: cache config data No 'bin' directory

Output of which borg: /bin/borg

Output of /bin/borg -V borg 1.1.17

So how come the Vorta GUI is reporting ' 1.2.0 /app/bin/borg'?

As an aside, when I first tried installing Vorta for Borg on my system (about eight months ago) using the GIT clone, ran in to issues. So, I was left with installing the flatpak version. Could it be that the borg 1.1.17 is still hanging around from that 'attempted' GIT clone install? If so, how to do I use the latest version (I take it this is 1.2.0?) system-wide (both within Vorta for borg GUI and CLI)?

By the way I searched for a 'borg' throughout my system and piped the output to a text file. Then searched for 'app/bin/borg' within the text file. No trace of it.

ThomasWaldmann commented 2 years ago

I guess borg 1.2 comes bundled into vorta and is not available to the outside, maybe @m3nu can explain.

m3nu commented 2 years ago

borg delete --keep-security-info /media/data/backup/borg/

If you run this, you won't use the bundled Borg version. Bundled Borg 1.2 is here: /Applications/Vorta.app/Contents/Resources/borg-dir/borg.exe

The bundled single folder binary is downloaded as-is from Github and signed during the build process on Github Actions. I don't touch or change it.

kntasks commented 2 years ago

'/Applications/Vorta.app/Contents/Resources/borg-dir/borg.exe'

Is this on a Windows or Apple Mac O/S?

I searched my void linux system for a directory called Vorta.app, but there is no such directory.

I then installed Vorta on my Windows 10 VirtualBox virtual machine just to check. After successful installation (I was able to type 'Vorta' in ubuntu session and bring up the Vorta for Borg GUI) searched the Windows file system and within the ubuntu terminal for 'Vorta.app' . No results came up.

Search for borg.exe was the same. No results found. Did see within the vorta for borg GUI on Ubuntu (Windows 10 VirtualBox virtual machine ) that the borg version and path is: 1.2.0 /usr/bin/borg

Within Ubuntu (in Windows 10 Virtualbox virtual machine) if I do:

borg -V

the output is: 1.2.0

m3nu commented 2 years ago

Vorta.app is only for macOS. We don't package Borg for any other platform.

ThomasWaldmann commented 2 years ago

Guess this is solved: wrong borg version invoked that does not support this option.

kntasks commented 2 years ago

How do we invoke the correct version (without using macOS as our OS then installing Borg through Github on MacOS)? As I said before, downloading and installing through source did not work on my Linux system, so have to use Flatpak installation.

Any ideas?

ThomasWaldmann commented 2 years ago

Easiest is to download the pyinstaller-made fat binary from github releases page and put it into a directory that is listed in $PATH.