1

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@192.168.1.90:/volume1/public/Backups/bup -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__
    self.check_ok()
  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?

1
+50

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
| 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
1

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

!#/bin/sh
PATH="$PATH:/opt/bin" /path/to/bup
| 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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