V300migrate - skilchen/bots GitHub Wiki
Migrate/update to 3.0.0
Introduction
Version 3.0 is a bigger update for bots, view all changes.
Overview:
- Django 1.1 and 1.2 are not supported anymore. Supported are django 1.3 and 1.4.
- Settings.py is changed. Advised: use the new settings.py, and do your customization in the new setting.py (eg for error reports, maybe database and timezone).
- The database has changed. A script is included to change the database. I had no database issues while testing this migration.
- lots of changes in bots.ini. The 'old' bots.ini is OK, but it is advised to use new bots.ini, and do your customizations there.
- Excel input: does work; but is now an incoming messagetype and not via 'preprocessing'.
- Most user scripts will work; many user scripts are not needed anymore because the functionality is provided by bots now.
- Some functions that may be used in user scripting have
changed:
- botslib.change() -> botslib.changeq(). This function is used to in processing incoming 997's and CONTRL!!
- botsengine routescripts: for 'new' runs in routescript botsengine.py called function postnewrun(routestorun) -> postnew(routestorun)
- communication.run(idchannel,idroute) -> communication.run(idchannel,command,idroute). Command is one of: 'new','automaticretrycommunication','resend','rereceive'.
- transform.run(idchannel,idroute) -> transform.run(idchannel,command,idroute). Command is one of: 'new','automaticretrycommunication','resend','rereceive'. My experiences: after changing settings.py and database migration, all works (except for and issues mentioned above).
Summary of procedure
- make a backup!
- rename existing installation.
- do a fresh install.
- copy old data to new installation.
- change settings
- update the database. Comments:
- It is critical to change the settings before updating the database! Bots finds the right database via the settings!
- If you use MySQL or PostGreSQL: same procedure. The bots-updatedb script also updates MySQL or PostGreSQL.
- Tested this for migration from bots2.2.1 -> 3.0.0, but works for
all bots2.
*
installations.
Windows procedure
-
make a backup!
-
rename existing installation
- existing bots-installation is in C:\Python27\Lib\site-packages
- renamed bots directory to bots221
- also renamed existing directories for cherrypy, django, genshi.
-
do a fresh install of bots3.0.0 installer (bots-3.0.0.win32.exe)
-
copy old data to new installation.
- in C:\Python27\Lib\site-packages new directories have been installed (bots, django, cherrypy, genshi)
- copy directories botssys and usersys from bots221-directory to bots directories. Everything can be overwritten.
-
change settings
- use new config/bots.ini, adapt for your own values.
- use new config/settings.py, adapt for your own values. Especially the database settings are important; the format is slightly different (but similar enough to give no problem); critical is using the 'ENGINE'-value of the new settings.py.
-
update the database.
- use command-prompt/dos-box
- goto directory C:\Python27\Scripts
- command-line:
C:\Python27\python bots-updatedb.py
- should report that database is successful changed.
If you use a 64-bits version of windows another option is to use the 64-bits versions of python and bots.
Linux procedure
-
make a backup!
-
rename existing installation
- existing bots-installation is in /usr/local/lib/python2.7/dist-packages
- renamed bots directory to bots221
- for libraries: check you use at least django 1.3
-
do a fresh install: see installation procedure
-
copy old data to new installation.
- in /usr/local/lib/python2.7/dist-packages new bots-directory is installed.
- copy directories botssys and usersys from bots221-directory to bots directories. Everything can be overwritten.
- mind your rights!
-
change settings
- use new config/bots.ini, adapt for your own values.
- use new config/settings.py, adapt for your own values. Especially the database settings are important; the format is slightly different (but similar enough to give no problem); critical is using the 'ENGINE'-value of the new settings.py.
-
update the database.
command-line:bots-updatedb.py
should report that database is successful changed.