[ckan-dev] Backup problems using paster db dump with spatial extension

David davisoski at gmail.com
Thu Oct 16 10:23:51 UTC 2014


Hi.

I'm trying to backup and restore my database, but I'm getting problems.

Making this steps in another simple ckan installation without any 
extension*everything works great*. I make backup and restore without 
problems.


My ckan in *Internet* has spatial-extension and is where the problem occurs.

Using steps in:
*https://ckan.readthedocs.org/en/1377-javascript-tutorial/maintaining/upgrading/index.html*

. /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src/ckan
paster db dump --config=/etc/ckan/default/production.ini 
my_ckan_database.pg_dump

ERROR;
(default)root at server:/usr/lib/ckan/default/src/ckan# paster db dump --conf
ig=/etc/ckan/default/production.ini my_ckan_database_16102014.sql
2014-10-16 11:42:59,794 WARNI [ckan.plugins.core] Plugin 
'googleanalytics' is us
ing deprecated interface IGenshiStreamFilter
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR:  permission denied for 
relation spati
al_ref_sys
pg_dump: The command was: LOCK TABLE public.spatial_ref_sys IN ACCESS 
SHARE MODE
Traceback (most recent call last):
   File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
     load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/com
mand.py", line 104, in run
     invoke(command, command_name, options, args[1:])
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/com
mand.py", line 143, in invoke
     exit_code = runner.run(args)
   File 
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/com
mand.py", line 238, in run
     result = self.command()
   File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 172, in 
command
     self.dump()
   File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 246, in dump
     pg_cmd = self._postgres_dump(dump_path)
   File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 223, in 
_postgres_
dump
     self._run_cmd(pg_dump_cmd)
   File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 237, in 
_run_cmd
     raise SystemError('Command exited with errorcode: %i' % retcode)
SystemError: Command exited with errorcode: 1
(default)root at server:/usr/lib/ckan/default/src/ckan#


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20141016/c5a492e6/attachment-0002.html>


More information about the ckan-dev mailing list