The booktype installation instructions at github tell you how to install a new booktype instance but I was unclear about how to upgrade from booki to booktype.It looks to me that an upgrade is similar to an installation except that we would copy the current settings.py file from the existing booki directory to the new booktype one (at step 5) and that there is no need to create a super user account (step 9). I would appreciate feedback on the viability of this approach. And, if this would blow up an existing booki installation, please tell me that, too.
I've installed Booki 1.4 on my computer and tomorrow night I plan to upgrade that installation to Booktype 1.5.2 using the instructions listed below.
2. Change dir to 'Booktype/scripts' cd Booktype/scripts
3. Create booktype instance. If you have write permissions, script will create directory /var/www/mybooktype/. If you don't have write permissions, administrator should create that directory first. sudo mkdir /var/www/mybooktype/ sudo chown www-data:www-data /var/www/mybooktype/
5. Copy the old settings.py file from the original "booki" folder into the new mybooktype folder. Update the settings.py file as per instructions in "How to migrate to Booktype 1.5.2" vi settings.py
when doing upgrade there is no need for the same steps as in install process. You already have working database filled with existing user and book data. Steps also depends of how long do you want to be offline during the upgrade process. Anyhoo, here is a list of steps you can do (you will be longer offline):
- backup database and settings.py file [important step]
- clone Booktype source from git repository [i assume this will end up in "Booktype" directory]
- stop apache
- i assume Booki is in "Booki" directory. Rename it to "_Booki" and make soft link where you point "Booki" to "Booktype". No need for this but it can save you at this point from changing path variables in settings.py, shell scripts, apache configuration and cron jobs.
- copy cron_backup.sh and cron_reports.sh scripts from _Booki/scripts/ to Booktype/scripts/
- check the INSTALL file what changes you need to do in settings.py file
- load environment variables with "source booki.env"
- do database migration with "django-admin.py migrate"
- start apache
Be aware you should be root only when you stop/start apache. In your case, for everything else you should be "www-data" user. To connect to the database you should use config data from settings.py file.