Unable to make a restore

19 views
Skip to first unread message

cionf...@gmail.com

unread,
Jan 30, 2018, 12:00:51 PM1/30/18
to rdiffweb
Hi there,

librdiff.py, class RdiffRepo, method execute() unfortunately fails a restore

[2018-01-30 16:45:08,004][ERROR  ][127.0.0.1][none][RestoreThread-15][rdiffweb.librdiff] restore failed
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/rdiffweb/librdiff.py", line 886, in _async
    output)
  File "build/bdist.linux-x86_64/egg/rdiffweb/librdiff.py", line 659, in execute
    env=env)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory


 654         parms = [b'rdiff-backup']
 655         parms.extend(args)
 656         execution = subprocess.Popen(
 657             parms, stdout=subprocess.PIPE,
 658             stderr=subprocess.PIPE,
 659             env=env)

The problem is the line 654.

I changed it in  parms = [b'/usr/local/bin/rdiff-backup'], and it works.

May i have a trouble in my rdiffweb installation?

Cheers,

Alessio




Patrik Dufresne

unread,
Jan 30, 2018, 1:09:18 PM1/30/18
to cionf...@gmail.com, rdiffweb
It seams rdiff-backup is not in your PATH. This is unexpected.

--
Patrik Dufresne Service Logiciel inc.
http://www.patrikdufresne.com/
130 rue Doris
St-Colomban, QC J5K 1T9

--
You received this message because you are subscribed to the Google Groups "rdiffweb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rdiffweb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

cionf...@gmail.com

unread,
Jan 31, 2018, 9:00:56 AM1/31/18
to rdiffweb

Hi Patrik.

rdiff-backup seems to be in the PATH

the command which find it

alessio@tolinda:~$  which rdiff-backup
/usr/local/bin/rdiff-backup

and if i call rdiff-backup from my home

alessio@tolinda:~$ rdiff-backup
Fatal Error: No arguments given
See the rdiff-backup manual page for more information.

But it is something about path.

If i copy rdiff-backup in then folder rdiffweb-master in my home (then i extracted master.tag.gz) and i start rdiffweb with /usr/locall/bin/rdiffweb, the restore operation run successfully.

If i start rdiff-backup with systemctl, this workaround doesn't work.

Cheers.
Alessio.
To unsubscribe from this group and stop receiving emails from it, send an email to rdiffweb+u...@googlegroups.com.

Patrik Dufresne

unread,
Jan 31, 2018, 9:36:31 AM1/31/18
to cionf...@gmail.com, rdiffweb
Hello Alessio,

Most likely, the way you start rdiffweb has an impact on PATH environment variable. As example, if you start rdiffweb using systemd vs initd. To get the environment variable of a running process do has follow.

$ which rdiff-backup
/usr/bin/rdiff-backup

$ ps -ef | grep rdiffweb
root      5866     1  0  2017 ?        01:26:41 /usr/bin/python /usr/local/bin/rdiffweb

$ sudo cat /proc/5866/environ 
CONSOLE=/dev/consoleHOME=/init=/sbin/initrunlevel=2INIT_VERSION=sysvinit-2.88TERM=linuxCOLUMNS=128BOOT_IMAGE=/boot/vmlinuz-3.16.0-0.bpo.4-amd64PATH=/sbin:/usr/sbin:/bin:/usr/binRUNLEVEL=2PREVLEVEL=NSHELL=/bin/shPWD=/previous=NLINES=48rootmnt=/root


As you can see, my PATH variable is "/sbin:/usr/sbin:/bin:/usr/bin". You need to make sure rdiff-backup is available it that path. Otherwise, you need to change the PATH variable of your service.

May you provide a bit more details about your system ?  Linux distribution, version, etc.
How did you install rdiff-backup ? from rpm, dep ?
How did you install rdiffweb ? from pypi, tar.gz, etc ?

The expected installation setup is has follow:
- Install on debian
- Install rdiff-backup from debian repos
- Install rdiffweb from pypi


--
Patrik Dufresne Service Logiciel inc.
http://www.patrikdufresne.com/
130 rue Doris
St-Colomban, QC J5K 1T9

To unsubscribe from this group and stop receiving emails from it, send an email to rdiffweb+unsubscribe@googlegroups.com.

cionf...@gmail.com

unread,
Jan 31, 2018, 11:29:08 AM1/31/18
to rdiffweb

Hi Patrik.

I installed rdiff-backup and rdiffweb from sources (downloaded from http://www.nongnu.org/rdiff-backup/ for rdiff-backup and from your site for rdiffweb, and both installed with python setup.py install), on a debian 8.10.

I removed both and reinstalled as your suggestion (debian repo and pypi).

Now everything it's ok.

Thanks a lot for your patience.

Cheers.
Alessio

Patrik Dufresne

unread,
Jan 31, 2018, 12:10:30 PM1/31/18
to cionf...@gmail.com, rdiffweb
The installation of rdiff-backup from source might be the source of your issue. When installing rdiff-backup from source, the installation path is /usr/local/bin. By default, this path is not in the PATH environment variable.

It would have been possible to change the Service Unit file to fix this too.

I'm glad everything is working as expected !

--
Patrik Dufresne Service Logiciel inc.
http://www.patrikdufresne.com/
130 rue Doris
St-Colomban, QC J5K 1T9

To unsubscribe from this group and stop receiving emails from it, send an email to rdiffweb+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages