Linux 安装backrest服务不成功解决方案

发布于:2024-10-11 ⋅ 阅读:(9) ⋅ 点赞:(0)

 执行命令

sudo sh install.sh 

出现下列提示

Installing on Linux
Installing backrest to /usr/local/bin
Creating systemd service at /etc/systemd/system/backrest.service
Reloading systemd daemon
Enabling systemd service backrest.service
Created symlink /etc/systemd/system/multi-user.target.wants/backrest.service → /etc/systemd/system/backrest.service.
Logs are available at /tmp/backrest.log
Access backrest WebUI at http://localhost:9898

使用curl http://localhost:9898 访问访问,被拒绝 

使用 journalctl -u backrest 查看报错信息如下

{"level":"fatal","ts":1727246004.9633996,"msg":"error finding or installing restic: install restic: http GET https://github.com/restic/restic/releases/download/v0.17.1/restic_0.17.1_linux_amd64.bz2: Get \"https://objects.githubusercontent.com/github-production-release-asset-2e65be/19205896/782d8279-af8e-4a66-87f9-270ba6faad89?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240925%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240925T063217Z&X-Amz-Expires=300&X-Amz-Signature=cf6eba0e4e91a7dfb3e20ff485f7f1cb52076103ee0f1110acda4e761f8ef55f&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Drestic_0.17.1_linux_amd64.bz2&response-content-type=application%2Foctet-stream\": net/http: TLS handshake timeout"}

从上述报错信息可以看出 ,是无法下载restic

根据https://github.com/garethgeorge/backrest 源码信息,如何本地配置了/usr/bin/restic-0.17.1 就就可以跳过下载这一步