[ckan-dev] CKAN DB back-up

Jindřich Mynarz mynarzjindrich at gmail.com
Wed Jul 13 17:41:55 UTC 2011


Great, now I've managed to get the SQL dump to backup Czech CKAN.
Thanks for letting me know where to look.

Cheers,

Jindrich

2011/7/13 David Read <david.read at okfn.org>:
> Yes you need the password. This is with all the db details in the
> cz.ckan.ini file. See:
> http://packages.python.org/ckan/configuration.html#sqlalchemy-url
>
> David
>
> 2011/7/13 Jindřich Mynarz <mynarzjindrich at gmail.com>:
>> Hi David,
>>
>> thanks for a quick answer. However, I can't carry it out, because I
>> don't have a password to access the PSQL hosted at psql.okfn.org. Is
>> it necessary or am I mistaken?
>>
>> Cheers,
>>
>> Jindrich
>>
>> 2011/7/13 David Read <david.read at okfn.org>:
>>> 2011/7/13 Jindřich Mynarz <mynarzjindrich at gmail.com>:
>>>> Hi,
>>>>
>>>> thanks to David Read, I've got access to the Czech community instance
>>>> of CKAN running at http://cz.ckan.net. It's hosted at eu19.okfn.org
>>>> and it runs CKAN version 1.3.3b. First thing that I've tried was to
>>>> back-up the CKAN's database, so I tried the paster command:
>>>>
>>>> $ paster --plugin=ckan db dump cz_ckan_backup.pg_dump --config=cz.ini
>>>>
>>>> Which resulted in the following traceback:
>>>>
>>>> /usr/lib/pymodules/python2.6/ckan_deps/sqlalchemy/engine/url.py:105:
>>>> SADeprecationWarning: The SQLAlchemy PostgreSQL dialect has been
>>>> renamed from 'postgres' to 'postgresql'. The new URL format is
>>>> postgresql[+driver]://<user>:<pass>@<host>/<dbname>
>>>>  module = __import__('sqlalchemy.dialects.%s' % (dialect, )).dialects
>>>> This functionality is mothballed for now.
>>>
>>> "paster db dump" was added by release 1.3.3, which your site is
>>> running a beta copy of, but obviously just missed out.
>>> http://trac.ckan.org/ticket/1067
>>>
>>> But it is merely a handy wrapper for pg_dump. So I suggest you use
>>> that instead. Here's the format:
>>> $ pg_dump -U <user> <db_name> > <dumpfile>
>>>
>>> David
>>>
>>>>
>>>> I remember seeing the same error when David tried to back-up the CKAN
>>>> DB in this way, however I don't know how he resolved it. So my
>>>> question is how can you back-up your CKAN's DB to an SQL dump? Is this
>>>> issue with the paster command fixed in the newer versions of CKAN? Is
>>>> there an alternative approach for backing up CKAN's database? Is the
>>>> back-up process documented somewhere?
>>>>
>>>> Cheers,
>>>>
>>>> Jindrich Mynarz
>>>>
>>>
>>
>




More information about the ckan-dev mailing list