lobaro / restic-backup-docker

A docker container to automate backups with restic
Apache License 2.0
345 stars 113 forks source link

"ssh": executable file not found in $PATH #27

Closed mrclschstr closed 4 years ago

mrclschstr commented 5 years ago

I try to use the docker image tagged as latest for backing up to SFTP. It seems like there is an issue with the $PATH variable. My output looks the following.

Starting container ... Restic repository 'sftp:username@server:/some/path' does not exists. Running restic init. Setup backup cron job with cron expression BACKUP_CRON: /5 * Container started. create backend at sftp:username@server:/some/path failed: cmd.Start: exec: "ssh": executable file not found in $PATH

The images v1.0 and v1.1 are working fine. Am I doing something wrong?

niondir commented 5 years ago

Thanks for reporting. Looks like ssh got lost. Maybe some change in the busybox base image? I would need to take a deeper look into this.

PR are welcome.

niondir commented 5 years ago

We could at least pin the version of the base image to avoid such issued in future.

niondir commented 5 years ago

The official image is adding ssh-client to the alpine image: RUN apk add --update --no-cache ca-certificates fuse openssh-client

See also: #23

I guess we should kick out busybox and rely on alpine

wuast94 commented 4 years ago

i got down to version 1.1 now to get ssh backups running. would be nice to see this fixed in next release :)

niondir commented 4 years ago

With the "latest" release I can go into my container and execute "ssh" without issues. I assume it's fixed.