Opentaste / bombolone

Bombolone is a tasty Content Management System for Python based on Flask, MongoDB, AngularJS, Sass and Bootstrap. It's designed to be a simple, flexible toolset for projects of any size.
Other
74 stars 20 forks source link

Init Bombolone Mongodb Error #22

Open fernandojunior opened 9 years ago

fernandojunior commented 9 years ago

Error when try to init Bombolone Mongodb: $ mongorestore --db new_app --drop data/backup/mongodb/2014-07-29/bombolone connected to: 127.0.0.1 Wed Oct 15 03:58:07.208 ERROR: don't know what to do with file [data/backup/mongodb/2014-07-29/bombolone]

The dev renamed the folder and forgot to change the command. For init bombolone mongodb, use this command: $ mongorestore --db new_app --drop data/backup/mongodb/2014-07-29/new_app

Then, update config.py file at line 7. Change DATABASE = 'bombolone' to DATABASE = 'new_app'

Zizzamia commented 9 years ago

Sweet, thanks @fernandojunior do you mind fix this installation issue with a pull request. Thank you, now I'm in vacation in Italy, but when I will back in San Francisco next week I will complete the milestone Version 0.3.4. In the last month I was more focus to #ngTasty but I will totally back taking care of Bombolone. Ciao

devilicecream commented 9 years ago

This can be solved removing the need to initialize the database from a backup, and instead using a script (written in javascript or python) that could also support updates. Regarding the backup and restore, I think a command to do it specifying the path of the backup file would be the best to avoid this kind of errors.

Zizzamia commented 9 years ago

I'm agree with @devilicecream, some extra thoughts about it @diegorusso ?

diegorusso commented 9 years ago

It is good practice not to initialise an application from a backup. You can do it later for backing up/restoring purposes though but not for initialise. I would drop mongodb dump/restore functionality and write the initial data in a file which will be read by an initi script as @devilicecream said. This obviously depends on the amount of data needed to initialise Bombolone.