zertrin/duplicity-backup.sh

"/dev/fd/62: Operation not supported" errors on FreeBSD

Opened this issue · 6 comments

FreeBSD 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789:

When i make backup or show list or show status, i have errors:

/usr/local/bin/duplicity-backup: line 279: /dev/fd/62: Operation not supported
/usr/local/bin/duplicity-backup: line 281: /dev/fd/62: Operation not supported
/usr/local/bin/duplicity-backup: line 298: 3: Bad file descriptor

(/usr/local/bin/duplicity-backup is the symlink to a duplicity-backup.sh)

Hum, it looks like redirecting file descriptors to subprocesses isn't supported on FreeBSD... As I never used FreeBSD myself, I'm not sure how to fix this. Maybe you could report here which version of bash your FreeBSD is running.

I'm not really willing to rollback the full rework of logging, however maybe there is a workaround for FreeBSD. In the worse case, it may be possible to disable tee'ing stderr/stdout for FreeBSD only, but that would be the least preferred solution.

GNU bash, version 4.3.42(1)-release (amd64-portbld-freebsd10.1)

I don't get this error with the stable branch (obviously) nor with the master branch from a few seconds ago. Logfile output gets printed to stdout (don't know if it's supposed to do that but it's OK for me) and everything works fine. It doesn't even matter whether I have fdescfs mounted or not (a FreeBSD thing one has to do when using bash).

FreeBSD 11.0-RELEASE-p1
duplicity-backup.sh v1.2
duplicity 0.7.10
GNU bash, version 4.4.0(0)-release (armv6-portbld-freebsd11.0)

From some searches online I've found this possible solution: (from rbenv/rbenv#401 (comment) )

sudo mount -f fdescfs fdescfs /dev/fd

Could you try and report if it changes anything?

The issue seems that

bash now requires fdescfs(5) mounted on /dev/fd which FreeBSD does not yet do as default.

Other useful pages:

sudo mount -t fdescfs fdesc /dev/fd
fix this issue on FreeBSD 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789

I ran into this issue within a FreeBSD Jail running 10.3 while using ezjail. I set an option in the ezjail specific jail's conf to resolve:

export jail_myjail_fdescfs_enable="YES"