Redmine Update » History » Version 8
Andreas Kohlbecker, 02/13/2018 03:51 PM
1 | 1 | Andreas Kohlbecker | # RedmineUpdate |
---|---|---|---|
2 | |||
3 | This is a brief summary of the steps required to update this redmine installation. |
||
4 | |||
5 | 7 | Andreas Kohlbecker | **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 does not involve moving/copying config files etc. |
6 | 1 | Andreas Kohlbecker | |
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 | 5 | Andreas Kohlbecker | mysqldump -h 160.45.63.*** -uredmine -p redmine | bzip2 > ../redmine-$(date +"%Y-%m-%d").sql.bz2 |
40 | tar -czf ../redmine-$(date +"%Y-%m-%d").tar.gz ../redmine |
||
41 | 1 | Andreas Kohlbecker | ~~~ |
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 | 8 | Andreas Kohlbecker | Update by rebasing |
54 | 1 | Andreas Kohlbecker | |
55 | 8 | Andreas Kohlbecker | (Create a new branch for each minor version) |
56 | |||
57 | 1 | Andreas Kohlbecker | ~~~ |
58 | 8 | Andreas Kohlbecker | git rebase --onto $TAG $LAST_TAG edit-redmine-production-3.3 |
59 | 2 | Andreas Kohlbecker | ~~~ |
60 | 1 | Andreas Kohlbecker | |
61 | 6 | Andreas Kohlbecker | ## 4. Update the dependencies and database |
62 | 1 | Andreas Kohlbecker | |
63 | ~~~ |
||
64 | bundle install --without development test rmagick |
||
65 | bundle exec rake generate_secret_token |
||
66 | bundle exec rake db:migrate RAILS_ENV=production |
||
67 | bundle exec rake redmine:plugins:migrate RAILS_ENV=production |
||
68 | bundle exec rake tmp:cache:clear tmp:sessions:clear |
||
69 | 5 | Andreas Kohlbecker | service apache2 restart |
70 | 1 | Andreas Kohlbecker | ~~~ |
71 | |||
72 | Finally go to "Administration -> Roles & permissions" to check/set permissions |
||
73 | for new features, if any |
||
74 | 3 | Andreas Kohlbecker | |
75 | ## 5. Disable maintenance mode |
||
76 | |||
77 | 1 | Andreas Kohlbecker | Comment the line in the virtual host configuration again and reload apache. |