Redmine Update » History » Version 4
Andreas Kohlbecker, 12/21/2016 02:03 PM
1 | 1 | Andreas Kohlbecker | # RedmineUpdate |
---|---|---|---|
2 | |||
3 | This is a brief summary of the steps required to update this redmine installation. |
||
4 | |||
5 | **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. |
||
6 | |||
7 | In the following it is assumed that the commands are executed from within the redmine installation folder, so as first step |
||
8 | |||
9 | ~~~ |
||
10 | cd $REDMINE_ROOT |
||
11 | ~~~ |
||
12 | |||
13 | 3 | Andreas Kohlbecker | ## 1. Enable maintenance mode |
14 | 1 | Andreas Kohlbecker | |
15 | 3 | Andreas Kohlbecker | Uncomment the following line in `/etc/apache2/sites-available/siteconf/dev.e-taxonomy.eu.conf` |
16 | |||
17 | 1 | Andreas Kohlbecker | ~~~ |
18 | 4 | Andreas Kohlbecker | # Disabling Redmine for maintenace |
19 | RewriteCond $1 !^projects/edit/wiki/Maintenance.* |
||
20 | RewriteCond $1 !^stylesheets/.* |
||
21 | RewriteCond %{REQUEST_FILENAME} !-f |
||
22 | RewriteCond %{REQUEST_FILENAME} !-d |
||
23 | # restrict access by IP Adress: |
||
24 | # ... |
||
25 | RewriteCond %{REMOTE_ADDR} !^**\.**\.**\.**$ |
||
26 | 3 | Andreas Kohlbecker | RewriteRule ^/redmine/(.*) http://dev.e-taxonomy.eu/redmine/projects/edit/wiki/Maintenance [R] |
27 | 4 | Andreas Kohlbecker | |
28 | 3 | Andreas Kohlbecker | ~~~ |
29 | |||
30 | Reload Apache |
||
31 | |||
32 | ~~~ |
||
33 | service apache2 reload |
||
34 | ~~~ |
||
35 | |||
36 | ## 2. Backup |
||
37 | |||
38 | ~~~ |
||
39 | 1 | Andreas Kohlbecker | mysqldump -uroot -p redmine | bzip2 > redmine-$(date +"%m-%d-%y").sql.bz2 |
40 | tar -czf ../redmine-$(date +"%m-%d-%y").tar.gz ../redmine |
||
41 | ~~~ |
||
42 | |||
43 | 3 | Andreas Kohlbecker | ## 3. Update the code base |
44 | 1 | Andreas Kohlbecker | |
45 | ~~~ |
||
46 | git fetch -t |
||
47 | git fetch |
||
48 | git tag --list |
||
49 | ~~~ |
||
50 | |||
51 | Check if the target release tag is available |
||
52 | |||
53 | Update by rebasing |
||
54 | |||
55 | ~~~ |
||
56 | git rebase $TAG edit-redmine-production |
||
57 | 2 | Andreas Kohlbecker | ~~~ |
58 | 1 | Andreas Kohlbecker | |
59 | 3 | Andreas Kohlbecker | ## 4. Update the gems and database |
60 | 1 | Andreas Kohlbecker | |
61 | ~~~ |
||
62 | bundle install --without development test rmagick |
||
63 | bundle exec rake generate_secret_token |
||
64 | bundle exec rake db:migrate RAILS_ENV=production |
||
65 | bundle exec rake redmine:plugins:migrate RAILS_ENV=production |
||
66 | bundle exec rake tmp:cache:clear tmp:sessions:clear |
||
67 | ~~~ |
||
68 | |||
69 | Finally go to "Administration -> Roles & permissions" to check/set permissions |
||
70 | for new features, if any |
||
71 | 3 | Andreas Kohlbecker | |
72 | ## 5. Disable maintenance mode |
||
73 | |||
74 | Comment the line in the virtual host configuration again and reload apache. |
||
75 | 2 | Andreas Kohlbecker | |
76 | 1 | Andreas Kohlbecker |