Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to make a remote backup to my Synology NAS (DSM 4.1) using bup.

I compiled bup on my NAS from source, did there:

 BUP_DIR=/volume1/public/Backups/bup bup init
Initialized empty Git repository in /volume1/public/Backups/bup/

Then I tried: bup save --remote=root@ -n bubtest /home/user/BackupTest on my laptop but got the following error message:

env: python: No such file or directory
Traceback (most recent call last):
  File "/usr/lib/bup/cmd/bup-save", line 74, in <module>
    cli = client.Client(opt.remote)
  File "/usr/lib/bup/bup/client.py", line 91, in __init__
  File "/usr/lib/bup/bup/client.py", line 132, in check_ok
    return self.conn.check_ok()
  File "/usr/lib/bup/bup/helpers.py", line 389, in check_ok
    return self._check_ok(onempty)
  File "/usr/lib/bup/bup/helpers.py", line 377, in _check_ok
    raise Exception('server exited unexpectedly; see errors above')
bup.client.ClientError: server exited unexpectedly; see errors above

On my laptop which python tells me /usr/bin/python. On my NAS which python gives /opt/bin/python.

Any idea to make it work?

share|improve this question
up vote 1 down vote accepted

A simple way to fix this is to add a symlink. As root:

ln -s /opt/bin/python /usr/bin/python

You can test it with this command:

env python
share|improve this answer
Thanks, that's fixes the problem. However now there is another error message that has nothing to do with the env problem... Perhaps I try to ask on the bup mailing list... – student Mar 29 '13 at 16:15

Note: I know nothing specific about bup.

It sounds like /opt/bin is not in your PATH on your NAS. As root (the user you use to login on your NAS using bup) try:

env | grep PATH

And see if it is there. If it's not, try adding it in root's shell (eg .bashrc).

edit: I just remembered that which probably already looks in the PATH. In that case, it may be that bup on your NAS edits or throws away the PATH. You could try making a script that starts bup with a correct PATH variable.

Sample script

PATH="$PATH:/opt/bin" /path/to/bup
share|improve this answer
Thanks. /opt/bin is in PATH. How do I make the script you suggested? – student Mar 29 '13 at 14:19
It depends a bit on how bup works. I thought /volume1/public/Backups/bup was an executable but now that I read it again I think it's a directory? I've added a sample script in my post, just in case – Dutchy Mar 29 '13 at 15:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.