I think the download failed. What command did you run to download that file? If you run less /usr/bin/restic I think you’ll see some plain text instead of an actual binary.
I’d suggest using curl -OL https://beta.restic.net/restic-v0.11.0-262-gaa0faa8c/restic_v0.11.0-262-gaa0faa8c_linux_amd64 to download the file.
You should get something like the following when running file on it:
$ file restic_v0.11.0-262-gaa0faa8c_linux_amd64
restic_v0.11.0-262-gaa0faa8c_linux_amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
To download I used this: wget https://beta.restic.net/restic-v0.11.0-262-gaa0faa8c/restic_v0.11.0-262-gaa0faa8c_linux_arm64
less /usr/bin/restic gives me lots of this ^?ELF^B^A^A^@^@^@^@^@^@^@^@^@^B^@<B7>^@^A^@^@^@0>^G^@^@^@^@^@@^@^@^@^@^@^@^@<C8>^A^@^@^@^@^@^@^@^@^@^@@^@8^@^G^@@
Trying curl admin@host:~$ curl -OL https://beta.restic.net/restic-v0.11.0-262-gaa0faa8c/restic_v0.11.0-262-gaa0faa8c_linux_amd64 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 25.6M 100 25.6M 0 0 161k 0 0:02:42 0:02:42 --:--:-- 732k $ file restic_v0.11.0-262-gaa0faa8c_linux_amd64 restic_v0.11.0-262-gaa0faa8c_linux_amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=jnxgGkfblVTeq3W4nW3j/2nHtk0Mj3494dyQ_6G1r/-D94l5l6sTLeq0GL2zei/vyPnd54xRK4PymNaGoJq, not stripped
This was previous file I had that didn’t work: $ file /usr/bin/restic /usr/bin/restic: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=f2-pps5F234whaLaL-w7/lmg9oij9fq4gYuB_SU68/Cfvu-7CaSBmsWyLATCE4/V3RrWOmwPC2RtkJxxjmt, not stripped it is ARM for some reason? Oh man looking at the wget command I used, I downloaded arm64 instead of amd64. But still weird that self-update doesn’t work by itself.
Ok so moved to /usr/bin/ $ restic version restic 0.11.0-dev (compiled manually) compiled with go1.15.6 on linux/amd64
And now I tried it again with Kubuntu and it magically worked today. Odd because I tried it 3-5 times yesterday. So the moral of the story is to try many many times, maybe even wait a day and it’ll work
$ sudo restic self-update [sudo] password for XXXXX: writing restic to /usr/bin/restic find latest release of restic at GitHub latest version is 0.11.0 download SHA256SUMS download SHA256SUMS.asc GPG signature verification succeeded download restic_0.11.0_linux_amd64.bz2 downloaded restic_0.11.0_linux_amd64.bz2 saved 19128320 bytes in /usr/bin/restic successfully updated restic to version 0.11.0
Sorry for taking us down this rabbit hole! Hope this helps some other newbies who are having trouble with self-update
I’d instead remove the restic package and put the downloaded binary in /usr/local/bin. The directory /usr/bin should usually only be used by OS packages. /usr/local/* is where you put stuff you install manually, outside of packages.