wiki:UserGuidelines/Admin/Upgrade

Version 3 (modified by Fran Boon, 14 years ago) ( diff )

--

(unfinished)

Put site into Maintenance:

vim /etc/crontab
#

vim /etc/apache/sites-available/maintenance
  RewriteEngine On
  RewriteRule ^/(.*) /maintenance.html

ln -sf /etc/apache/sites-available/maintenance /etc/apache/sites-enabled/mysite
/etc/init.d/apache2 force-reload

Upgrade code:

cd /path/to/web2py/applications/eden
bzr pull

Trial run:

cd /path/to/web2py
python web2py.py -S eden -M

Fix any Database Issues:

  1. The .table files in the databases directory contains what web2py knows about your database
  2. You need to set Migrate=True in models/000_config.py before you update the code and switch back to Migrate=False later on.
  3. In case of database mismatches - check the databases directory for the appropriate table ( cat the file ) and change accordingly.

If using MySQL, then can use phpMyAdmin, if using SQLite then can use sqlite3 (apt-get install sqlite3)

Restore site into production:

vim /etc/crontab
#
ln -sf /etc/apache/sites-available/mysite /etc/apache/sites-enabled/mysite
/etc/init.d/apache2 force-reload

UserGuidelines

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.