Requesting advice "best practices" for adding Kopia command line

I’m been using the GUI exclusively and have tested it with a restore. All seems to be working fine.

But now I wish to extend Kopia through the command line interface. Just what is the proper way to add it to Windows and Linux machines?

Did look for this information but may be suffering from “optical rectitus” (head up my ass). Did not find anything related to a parallel installation.

Any help is appreciated. This is very useful software and it has solved many problems here.

“parallel installation”? what is that…

Can you explain in simple term what you want to achieve?

I wish to use KopiaUI 90% of the time. Then use Kopia command line for maintenance tasks.

Problem example: This is what happens when I try to use apt install for my Ubuntu type distro. And yes, I had believed the Kopia repository was already installed.

sudo apt install kopia
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package kopia

Same thing with Windows. How do I gain access to those non GUI commands?

RTFM

So certain of yourself. Bet there’s a lifelong thread here. Your mother knew.

Is this correct for your version of ubuntu?

curl -s https://kopia.io/signing-key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/kopia-keyring.gpg

This did install the public key, but when I run the " ```
sudo apt install kopia" I get this error:


E: Malformed entry 1 in list file /etc/apt/sources.list.d/kopia.list (Component)
E: The list of sources could not be read.

On my windows 11 system where I installed koipiaui, I found the kopia executable at the following location:
“C:\Users\[username]\AppData\Local\Programs\KopiaUI\resources\server\kopia.exe”

Thanks for the clue. performed a search on the Windows box and found it… Wasn’t totally certain the command line component was already installed. That’s why I was attempting a new install.

Kopia UI installs into Linux through the normal repositories, but when you attempt to install Kopia command line through the app’s repository - it sends many things into the wrong folders. I can’t get Kopia’s app-get to work at all for me. Perhaps I’ll get lucky and find that the command line version is already installed :slight_smile: Thanks to you.

I just tried installing kopia-ui into an ubuntu vm. I don’t believe that the ui installation installs the cli.

larry@larry-Virtual-Machine:~$ locate kopia
/etc/alternatives/kopia-ui
/etc/apt/keyrings/kopia-keyring.gpg
/etc/apt/sources.list.d/kopia.list
/opt/KopiaUI/kopia-ui
/opt/KopiaUI/resources/icons/kopia-tray.png
/opt/KopiaUI/resources/server/kopia
/usr/bin/kopia-ui
/usr/share/applications/kopia-ui.desktop
/usr/share/doc/kopia-ui
/usr/share/doc/kopia-ui/changelog.gz
/usr/share/icons/hicolor/128x128/apps/kopia-ui.png
/usr/share/icons/hicolor/16x16/apps/kopia-ui.png
/usr/share/icons/hicolor/256x256/apps/kopia-ui.png
/usr/share/icons/hicolor/32x32/apps/kopia-ui.png
/usr/share/icons/hicolor/48x48/apps/kopia-ui.png
/usr/share/icons/hicolor/512x512/apps/kopia-ui.png
/usr/share/icons/hicolor/64x64/apps/kopia-ui.png
/var/lib/apt/lists/packages.kopia.io_apt_dists_stable_InRelease
/var/lib/apt/lists/packages.kopia.io_apt_dists_stable_main_binary-amd64_Packages
/var/lib/dpkg/alternatives/kopia-ui
/var/lib/dpkg/info/kopia-ui.list
/var/lib/dpkg/info/kopia-ui.md5sums
/var/lib/dpkg/info/kopia-ui.postinst
/var/lib/dpkg/info/kopia-ui.postrm

After installing the kopia CLI (sudo apt install kopia), I found it in /usr/bin/kopia

Now, looking at your error above, I suspect there is some junk in the file /etc/apt/sources.list.d/kopia.list

When you first ran “curl -s https://kopia.io/signing-key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/kopia-keyring.gpg”, are you sure it completed ok? On my fresh system, I got an error that curl needed to be installed so I had to do that first prior in order for this command to sucessfully complete.

Arrgh. Ran into so many problems with the Linux install - set it aside for now.

I am running verify on the windows box and it’s turning up a few errors like this: error reading object Ix05fc847b7a55f9f6d558a9f6480c3885: unable to read data: unexpected content error: invalid checksum at pf5dd84bfb38cd08b5dff9b94b8108c95-s3fb22b878abee0d912b offset 6421820 length 2132136/2132136: decrypt: unable to decrypt content: cipher: message authentication failed
Processed 16517 objects.
Finished processing 16528 objects.
ERROR error reading object Ix05fc847b7a55f9f6d558a9f6480c3885: unable to read data: unexpected content error: invalid checksum at pf5dd84bfb38cd08b5dff9b94b8108c95-s3fb22b878abee0d912b offset 6421820 length 2132136/2132136: decrypt: unable to decrypt content: cipher: message authentication failed

I’ve successfully cleared one of these errors by deleting the bad file then resnapshotting prior to re-verify. But the “cure” was very inelegant, and I can’t remember exactly what I did to make it go away :slight_smile:

I wish that kopia would just log errors then continue, but that does not seem to be an option.

Do know that the “ignore errors” field within kopiaui does work, because I’ve had no problems executing a full restore.

I’m relatively new to Kopia, so don’t take my advice as gospel, but it’s my understanding that you should only delete a bad file as a last resort. Prior to that, you’d want to try kopia snapshot fix invalid-files. See: https://kopia.discourse.group/t/best-method-to-ensure-valid-snapshots-snapshot-verify-vs-snapshot-fix-invalid-files