[ckan-dev] Database backup problem migrating from 2.2 to 2.4
David
davisoski at gmail.com
Thu Oct 29 11:01:52 UTC 2015
Hi.
Trying to migrate from 2.2 to 2.4, the first step is backup database, so
following the steps in:
http://docs.ckan.org/en/latest/maintaining/upgrading/index.html
I get this error:
paster db dump --config=/etc/ckan/default/production.ini
my_ckan_database.pg_dump
(default)root at myopendata:/usr/lib/ckan/default/src/ckan# *paster db dump
--config=/etc/ckan/default/production.ini my_ckan_database.pg_dump*
2015-10-29 11:44:53,166 WARNI [ckan.plugins.core] Plugin
'*googleanalytics*' is using deprecated interface IGenshiStreamFilter
*pg_dump: SQL command failed*
pg_dump: Error message from server: ERROR:permission denied for relation
spatial_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/command.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/command.py",
line 143, in invoke
exit_code = runner.run(args)
File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.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 myopendata:/usr/lib/ckan/default/src/ckan#
Maybe deleting temporaly googleanalytics extension?.
This is the content of my production.ini:
#
# CKAN - Pylons configuration
#
# These are some of the configuration options available for your CKAN
# instance. Check the documentation in 'doc/configuration.rst' or at the
# following URL for a description of what they do and the full list of
# available options:
#
# http://docs.ckan.org/en/ckan-2.2/configuration.html
#
# The %(here)s variable will be replaced with the parent directory of
this file
#
[DEFAULT]
# WARNING: *THIS SETTING MUST BE SET TO FALSE ON A PRODUCTION ENVIRONMENT*
debug = false
[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 5000
[app:main]
use = egg:ckan
full_stack = true
cache_dir = /tmp/%(ckan.site_id)s/
beaker.session.key = ckan
#Enable Page View Tracking
ckan.tracking_enabled = true
ofs.impl = pairtree
ofs.storage_dir = /var/lib/ckan/default
# This is the secret token that the beaker library uses to hash the
cookie sent
# to the client. `paster make-config` generates a unique value for this each
# time it generates a config file.
beaker.session.secret =
# `paster make-config` generates a unique value for this each time it
generates
# a config file.
app_instance_uuid = {e9786395-4423-4085-bd3e-8ae1f8d100af}
# repoze.who config
who.config_file = %(here)s/who.ini
who.log_level = warning
who.log_file = %(cache_dir)s/who_log.ini
## Database Settings
sqlalchemy.url = postgresql://ckan_default:pass@localhost/ckan_default
ckan.datastore.write_url =
postgresql://ckan_default:pass@localhost/datastore_default
ckan.datastore.read_url =
postgresql://datastore_default:pass@localhost/datastore_default
## Site Settings
ckan.site_url =
## Authorization Settings
ckan.auth.anon_create_dataset = false
ckan.auth.create_unowned_dataset = true
ckan.auth.create_dataset_if_not_in_organization = true
ckan.auth.user_create_groups = true
ckan.auth.user_create_organizations = false
ckan.auth.user_delete_groups = false
ckan.auth.user_delete_organizations = false
ckan.auth.create_user_via_api = false
# Puesto a false no muestra la opcion Registro
ckan.auth.create_user_via_web = false
ckan.auth.roles_that_cascade_to_sub_groups = admin
## Search Settings
ckan.site_id = default
solr_url = http://127.0.0.1:8983/solr
#ckan.simple_search = 1
## Plugins Settings
# Note: Add ``datastore`` to enable the CKAN DataStore
# Add ``datapusher`` to enable DataPusher
# Add ``pdf_preview`` to enable the resource preview for PDFs
# Add ``resource_proxy`` to enable resorce proxying and get
around the
# same origin policy
ckan.plugins = stats text_preview pdf_preview recline_preview
resource_proxy geojson_preview myextension googleanalytics
## Front-End Settings
ckan.site_title = MY OPEN DATA
ckan.site_logo = /base/images/logo.png
ckan.site_description =
ckan.favicon = /images/icons/data.ico
ckan.gravatar_default = identicon
ckan.preview.direct = png jpg gif
ckan.preview.loadable = html htm rdf+xml owl+xml xml n3 n-triples turtle
plain atom csv tsv rss txt json
#package_hide_extras = for_search_index_only
#package_edit_return_url = http://another.frontend/dataset/<NAME>
#package_new_return_url = http://another.frontend/dataset/<NAME>
#ckan.recaptcha.publickey =
#ckan.recaptcha.privatekey =
#licenses_group_url =
http://licenses.opendefinition.org/licenses/groups/ckan.json
#ckan.template_footer_end =
## Internationalisation Settings
ckan.locale_default = es
ckan.locale_order = es en pt_BR ja it cs_CZ ca fr el sv sr sr at latin no
sk fi ru de pl nl bg ko_KR hu sa sl lv
ckan.locales_offered =
ckan.locales_filtered_out = en_GB
## Feeds Settings
ckan.feeds.authority_name =
ckan.feeds.date =
ckan.feeds.author_name =
ckan.feeds.author_link =
## Storage Settings
#ckan.storage_path = /var/lib/ckan
#ckan.max_resource_size = 10
#ckan.max_image_size = 2
## Datapusher settings
# Make sure you have set up the DataStore
#ckan.datapusher.formats =
#ckan.datapusher.url = http://127.0.0.1:8800/
## Activity Streams Settings
ckan.activity_streams_enabled = True
#ckan.activity_list_limit = 31
ckan.activity_streams_email_notifications = true
# ckan.email_notifications_since = 2 days
ckan.hide_activity_from_users = sysadmin
## Email settings
#email_to =
#error_email_from =
#smtp.server =
#smtp.starttls = True
#smtp.user =
#smtp.password =
#smtp.mail_from =
#Google Analytics
googleanalytics.id = UA-52298XXX-X
googleanalytics.account =
googleanalytics.username =
googleanalytics.password =
#parametros opcionales
googleanalytics_resource_prefix = /downloads/
googleanalytics.domain = auto
googleanalytics.track_events = false
## Logging configuration
[loggers]
keys = root, ckan, ckanext
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARNING
handlers = console
[logger_ckan]
level = INFO
handlers = console
qualname = ckan
propagate = 0
[logger_ckanext]
level = DEBUG
handlers = console
qualname = ckanext
propagate = 0
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20151029/4855a2cf/attachment-0002.html>
More information about the ckan-dev
mailing list