Subject Backup problem over ssh tunnel
Author Steve
Hi,

I'm running into a problem trying to run nbackup() over an ssh tunnel. The tunnel pipes the server's port 3050 into localhost's port 30500. This is a test setup, and there are reasons for the tunnel and port specification.

This works:

con = fdb.connect(dsn = 'localhost/30500:M8', user = 'SYSDBA', password = 'password')
...
cur.execute("select first 5 * from ore;")
recs = cur.fetchall()

This does not:

con = fdb.services.connect(host = 'localhost/30500', user = 'SYSDBA', password = 'password')
con.nbackup('M8', '/home/steve/M8.bak')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/fdb/services.py", line 1122, in nbackup
self._act(request)
File "/usr/local/lib/python2.7/dist-packages/fdb/services.py", line 440, in _act
return self._action_thin(request_buffer.render())
File "/usr/local/lib/python2.7/dist-packages/fdb/services.py", line 437, in _action_thin
"Unable to perform the requested Service API action:")
fdb.fbcore.OperationalError: ('Unable to perform the requested Service API action:\n- SQLCODE: -901\n- Error (13) creating backup file: /home/steve/M8.bak', -901, 335544382)


It may be a file permissions problem, but I don't know where the program is putting the file - the local machine or the server. I've tried playing with various permissions settings on both machines, to no avail, as well as running python as root, and also tried different file locations.

On the other hand, it may be a problem with my syntax. I've tried playing with the host string, but it doesn't work either:

con = fdb.services.connect(host = 'localhost', port=30500, user = 'SYSDBA', password = 'password')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: connect() got an unexpected keyword argument 'port'

I've also tried backup() instead of nbackup(), but nothing happens. Any help would be appreciated.


Thanks in advance,



Steve