Projet

Général

Profil

Redmine » Historique » Version 7

Mehdi Abaakouk, 16/12/2014 10:39

1 1 Laurent GUERBY
{{>toc}}
2 1 Laurent GUERBY
3 1 Laurent GUERBY
h1. Redmine
4 1 Laurent GUERBY
5 7 Mehdi Abaakouk
La machine chiliproject contient:
6 7 Mehdi Abaakouk
7 7 Mehdi Abaakouk
 - une base données postgres
8 7 Mehdi Abaakouk
 - une application installé dans /srv/http/redmine
9 7 Mehdi Abaakouk
 - le git de git.tetaneutral.net dans /srv/http/repositories
10 7 Mehdi Abaakouk
11 1 Laurent GUERBY
h2. Liens
12 1 Laurent GUERBY
13 1 Laurent GUERBY
* https://wiki.ldn-fai.net/wiki/Redmine#Par_mail ouvrir un ticket redmine par mail
14 2 Mehdi Abaakouk
15 6 Mehdi Abaakouk
h2. Upgrade
16 6 Mehdi Abaakouk
17 6 Mehdi Abaakouk
# /etc/init.d/apache2 stop
18 6 Mehdi Abaakouk
# su - postgres
19 6 Mehdi Abaakouk
# pgdump redmine > redmine-3.X.X-20130108.sql
20 6 Mehdi Abaakouk
# exit
21 6 Mehdi Abaakouk
#
22 6 Mehdi Abaakouk
# ssh -Tf -D9999 h2 -p 2222  sleep 15m
23 6 Mehdi Abaakouk
# 
24 6 Mehdi Abaakouk
# cd /srv/http/redmine
25 6 Mehdi Abaakouk
# tsocks git fetch pull --rebase
26 6 Mehdi Abaakouk
# cd plugins/redmine_git_hosting
27 6 Mehdi Abaakouk
# git checkout v0.7.8
28 6 Mehdi Abaakouk
29 6 Mehdi Abaakouk
# cd /srv/http/redmine
30 6 Mehdi Abaakouk
31 6 Mehdi Abaakouk
# tsocks bundle update
32 6 Mehdi Abaakouk
# gem cleanup
33 6 Mehdi Abaakouk
# tsocks bundle update
34 6 Mehdi Abaakouk
# bundle exec rake generate_secret_token
35 6 Mehdi Abaakouk
# bundle exec rake db:migrate RAILS_ENV=production
36 6 Mehdi Abaakouk
# bundle exec rake redmine:plugins:migrate RAILS_ENV=production
37 6 Mehdi Abaakouk
# bundle exec rake tmp:cache:clear tmp:sessions:clear
38 2 Mehdi Abaakouk
39 2 Mehdi Abaakouk
h2. Investigation Erreur 500
40 2 Mehdi Abaakouk
41 5 Laurent GUERBY
http://lists.tetaneutral.net/pipermail/technique/2014-May/001335.html
42 5 Laurent GUERBY
43 2 Mehdi Abaakouk
Erreur dans /srv/http/redmine/log/production.log:
44 2 Mehdi Abaakouk
45 2 Mehdi Abaakouk
<pre>
46 2 Mehdi Abaakouk
Completed 500 Internal Server Error in 23.2ms
47 2 Mehdi Abaakouk
48 2 Mehdi Abaakouk
ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "wiki_content_versions_pkey"
49 2 Mehdi Abaakouk
DETAIL:  Key (id)=(164) already exists.
50 2 Mehdi Abaakouk
: INSERT INTO "wiki_content_versions" ("author_id", "comments", "compression", "data", "page_id", "updated_on", "version", "wiki_content_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"):
51 2 Mehdi Abaakouk
</pre>
52 2 Mehdi Abaakouk
53 2 Mehdi Abaakouk
<pre>
54 2 Mehdi Abaakouk
# su - postgres
55 2 Mehdi Abaakouk
# psql redmine
56 3 Mehdi Abaakouk
# select max(id) from wiki_content_versions;
57 4 Mehdi Abaakouk
max  
58 4 Mehdi Abaakouk
------
59 4 Mehdi Abaakouk
 6193
60 4 Mehdi Abaakouk
(1 row)
61 3 Mehdi Abaakouk
# alter sequence wiki_content_versions_id_seq start 6194;
62 3 Mehdi Abaakouk
# alter sequence wiki_content_versions_id_seq restart;
63 2 Mehdi Abaakouk
</pre>