[ckan-dev] Initializing/cleaning the database

Pabitra Dash pkdash_reena at hotmail.com
Tue Sep 17 14:41:30 UTC 2013


I am using ckan 2.1
 
Pabitra

 
> From: joe.tsoi at okfn.org
> Date: Tue, 17 Sep 2013 13:01:33 +0100
> To: ckan-dev at lists.okfn.org
> Subject: Re: [ckan-dev] Initializing/cleaning the database
> 
> Hey,
> 
> What version of ckan are you using, there was an issue with paster db
> clean a while back (see https://github.com/okfn/ckan/pull/1123). I
> think fix is only in master at the moment.
> 
> Joe
> 
> On 17 September 2013 10:29, David Read <david.read at hackneyworkshop.com> wrote:
> > Pabitra,
> >
> > 'paster db clean' should only take a few seconds. I've seen it stop
> > too, and I guess it is to do with needing database connections to be
> > released by a paster or apache process - so try quiting/restarting
> > those - that often works. Or restarting postgres itself is pretty
> > reliable to sort it.
> >
> > David
> >
> > On 16 September 2013 11:11, Richard Gomes <rgomes.info at gmail.com> wrote:
> >> Hello,
> >>
> >> I suppose you are willing to reset the entire database.
> >> This is what I do:
> >>
> >> #!/bin/bash
> >>
> >> set -x
> >>
> >> VENV=default
> >> source ~/.virtualenvs/${VENV}/bin/activate
> >> source ~/.virtualenvs/${VENV}/bin/postactivate
> >>
> >> pushd $CKAN_HOME
> >>
> >> # remove proxy settings. see: https://github.com/okfn/ckan/issues/1213
> >> `env | fgrep -i _proxy | cut -d= -f1 | xargs echo unset`
> >>
> >> sudo -u postgres dropdb ${CKAN_DATABASE}
> >> sudo -u postgres dropuser ${CKAN_USERNAME}
> >>
> >>
> >> sudo -u postgres createuser -S -D -R -P ${CKAN_USERNAME}
> >> sudo -u postgres createdb -O ${CKAN_USERNAME} ${CKAN_DATABASE} -E utf-8
> >>
> >>
> >> paster db init              -c $CKAN_ETC/default/development.ini
> >> paster search-index rebuild -c $CKAN_ETC/default/development.ini
> >> paster create-test-data     -c $CKAN_ETC/default/development.ini
> >> paster search-index rebuild -c $CKAN_ETC/default/development.ini
> >> paster sysadmin add admin   -c $CKAN_ETC/default/development.ini
> >>
> >> set +x
> >>
> >>
> >>
> >> Richard Gomes
> >> http://rgomes.info
> >> http://www.linkedin.com/in/rgomes
> >> mobile: +44(77)9955-6813
> >> inum: +883(5100)0800-9804
> >>
> >> On 15/09/13 04:24, Pabitra Dash wrote:
> >>
> >>
> >> Hello All,
> >>
> >> I am using the paster to delete all tables with the "db clean" command. I am
> >> not getting any output from this command even after waiting for a quite bit
> >> of time. I even tried the "db init" and the problem is the same. Any idea
> >> what I might be doing wrong?
> >>
> >> Thanks,
> >> Pabitra
> >>
> >>
> >>
> >> _______________________________________________
> >> ckan-dev mailing list
> >> ckan-dev at lists.okfn.org
> >> http://lists.okfn.org/mailman/listinfo/ckan-dev
> >> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
> >>
> >>
> >>
> >> _______________________________________________
> >> ckan-dev mailing list
> >> ckan-dev at lists.okfn.org
> >> http://lists.okfn.org/mailman/listinfo/ckan-dev
> >> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
> >>
> >
> > _______________________________________________
> > ckan-dev mailing list
> > ckan-dev at lists.okfn.org
> > http://lists.okfn.org/mailman/listinfo/ckan-dev
> > Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
> 
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130917/6f5a7e15/attachment-0001.html>


More information about the ckan-dev mailing list