How to fix bup remote sh: bup: not found
Problem:
When running bup using the bup remote function, e.g.
bup init -r 192.168.1.215:/var/bup
you see an error like
sh: bup: not found
Traceback (most recent call last):
File "/usr/lib/bup/cmd/bup-init", line 45, in <module>
cli = client.Client(argv_bytes(opt.remote), create=True)
File "/usr/lib/bup/cmd/../bup/client.py", line 108, in __init__
self._available_commands = self._get_available_commands()
File "/usr/lib/bup/cmd/../bup/client.py", line 181, in _get_available_commands
raise ClientError('unexpected help header ' + repr(line))
bup.client.ClientError: unexpected help header b''
Solution
First, login using SSH to your server and check if bup
is installed by running
bup
Example output:
Usage: bup [-?|--help] [-d BUP_DIR] [--debug] [--profile] <command> [options...]
Common commands:
fsck Check backup sets for damage and add redundancy information
ftp Browse backup sets using an ftp-like client
fuse Mount your backup sets as a filesystem
[...]
If that works, you need to ensure bup is located at /usr/bin/bup !
Run
which bup
to find out where bup
is located.
If, for example, it’s at /usr/local/bin/bup
, you need to symlink it to /usr/bin/bup
:
ln -sf /usr/local/bin/bup /usr/bin/bup