Project

General

Profile

Actions

Redmine Update » History » Revision 4

« Previous | Revision 4/17 (diff) | Next »
Andreas Kohlbecker, 12/21/2016 02:03 PM


RedmineUpdate

This is a brief summary of the steps required to update this redmine installation.

NOTE: The Redmine installation is a git clone from https://github.com/redmine/redmine. All modifications to existing and newly created configuration files are in the local branch edit-redmine-production. Thereby the update process is quite simple.

In the following it is assumed that the commands are executed from within the redmine installation folder, so as first step

cd $REDMINE_ROOT

1. Enable maintenance mode

Uncomment the following line in /etc/apache2/sites-available/siteconf/dev.e-taxonomy.eu.conf

# Disabling Redmine for maintenace
RewriteCond $1                  !^projects/edit/wiki/Maintenance.*
RewriteCond $1                  !^stylesheets/.*
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# restrict access by IP Adress:
#  ...
RewriteCond  %{REMOTE_ADDR}     !^**\.**\.**\.**$ 
RewriteRule ^/redmine/(.*)      http://dev.e-taxonomy.eu/redmine/projects/edit/wiki/Maintenance [R]

Reload Apache

service apache2 reload

2. Backup

mysqldump -uroot -p redmine | bzip2 > redmine-$(date +"%m-%d-%y").sql.bz2
tar -czf ../redmine-$(date +"%m-%d-%y").tar.gz ../redmine

3. Update the code base

git fetch -t
git fetch 
git tag --list

Check if the target release tag is available

Update by rebasing

git rebase $TAG edit-redmine-production

4. Update the gems and database

bundle install --without development test rmagick
bundle exec rake generate_secret_token
bundle exec rake db:migrate RAILS_ENV=production
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
bundle exec rake tmp:cache:clear tmp:sessions:clear

Finally go to "Administration -> Roles & permissions" to check/set permissions
for new features, if any

5. Disable maintenance mode

Comment the line in the virtual host configuration again and reload apache.

Updated by Andreas Kohlbecker over 7 years ago · 4 revisions