Skip to end of metadata
Go to start of metadata

How to upgrade

If you have downloaded Booktype source

Step 1

If you have Booktype running with Sqlite be aware that upgrade will not work if it will require certain changes in the database schema. Sqlite has no support for it. That is why PostgreSQL is supported platform for the production.

Step 2

Read "doc/UPGRADE.txt" file. If there is something extra needed to be done for the upgrade it will be there. We recommend you read that document online - https://github.com/sourcefabric/Booktype/blob/master/doc/UPGRADE.txt

Step 3

It depends of your situation but if you can (I am guess you can) afford downtime for couple of minutes we recommend you do that. Put your Booktype website down. Show some "Please wait, we are in the process of upgrade at the moment" instead. Also, notify your users in advance you will be doing upgrade.

Now is the time to backup your data. Do not start upgrade without backup!

Backup PostgreSQL database

Backup entire Booktype Project directory (this is where createbooki script has created your Booktype project). This will backup all attachments, profile pictures, custom templates, custom Django applications, ...)

Backup your Booktype source just in case you are not familiar with git and how to get previous version of Booktype (in case of a problem).

Step 3

Now is the time to upgrade your Booktype source. Be aware, you should never do any changes inside of Booktype source. All changes should and must be done inside of Booktype Project directory.

Pull the latest changes. Go to the directory where you have downloaded Booktype.

git pull

Step 4

Go to your Booktype Project and load environment variables for this project.

source booki.env

It is important now to do migrate database schema.

django-admin.py migrate

Step 5

If "doc/UPGRADE.txt" mentioned something about upgrading settings file or doing something similar, now is the time to do it.

Step Step 6

If everything was successful you can remove the upgrade message and start your Booktype server again.

In case of a problem

In case of a problem just restore all data back and start Booktype again. Try to figure out what went wrong. Ask on the Booktype forum.

What to do before upgrade

If you have done some local template modifications or installed local applications it is recommended to try upgrade on the test server (with your local modifications). If "doc/UPGRADE.txt" mentions something about changes in templates check if your local templates needs to be modified. If that is the case it is recommended to make copy of your changes (or do it on a test copy of Booktype) and modify templates there. After you have done upgrading copy modified templates to their real location. This way your downtime will be minimal.

  • No labels