Path of redmine plugins

$ /srv/redmine/plugins

How to install a new plugin

How to install CKEditor plugin for redmine

$ cd /srv/redmine/plugins
$ git clone
$ cd /srv/redmine/
$ bundle install
$ bundle update
$ vim /srv/redmine/config/environments/development.rb # set `config.eager_load = false`
$ vim /srv/redmine/config/environments/test.rb # set `config.eager_load = false`
$ vim /srv/redmine/config/environments/production.rb # set `config.eager_load = true`
$ rake redmine:plugins:migrate RAILS_ENV=production
$ service nginx restart

How to restart redmine

To restart redmine, just restart your web server

$ service nginx restart

how to show code changes on issues

Backup Redmine

Redmine backups should include:

data (stored in your redmine database)

attachments (stored in the files directory of your Redmine install)

Backup raw redmine mysql database:

$ /usr/bin/mysqldump -u <username> -p<password> <redmine_database> | gzip > /path/to/backup/db/redmine_`date +%y_%m_%d`.gz
$ mysqldump -u root redmine | gzip > redmine_`date +%y_%m_%d`.gz

Backup redmine mysql database with postgres compatibility format:

$ mysqldump -u root  --compatible=postgresql --default-character-set=utf8 redmine | gzip > redmine_`date +%y_%m_%d`.gz

But, this option may be not work when you want to restore data base to postgresql,

even when used with some script like:

Backup mysql redmine database with pgloader from mysql server and directly restore to to the postgres server:

$ sudo apt-get install pgloader
$ su - postgres
postgres@debian:~$ createdb redmine
# listen to remote running program on the remote host on the local host
$ ssh -N <USER>@<REMOTE-HOST>  -L 3306:localhost:3306
postgres@debian:~$ pgloader mysql://<USER>:<PASSWORD>@ postgresql:///redmine

Log of migration:

$ tail -f   /tmp/pgloader/pgloader.log

Note that warning is not important:

warning: table "<TABLE-NAME>" does not exist, skipping

Download backup files:

$ scp <user>@<remote_host>:/<path/of/backup/file> .
$ scp <user>@<remote_host>:/srv/redmine/files/ files

Setup redmine with docker image

Setup redmine with docker image and restore data from backup

$ docker pull postgresql
$ docker pull redmine

$ docker run --name postgres-01 -e POSTGRES_USER=postgres
                                -e POSTGRES_PASSWORD=postgres  postgres

# create redmine data base
$ createdb  -U postgres -h redmine

# restore db data to postgres
$ psql -U postgres -h -d redmine -f redmine_backup_pg_dump.sql
$ docker run --name redmine-01 -e POSTGRES_ENV_POSTGRES_USER=postgres
                               -e POSTGRES_ENV_POSTGRES_PASSWORD=postgres
                               -e POSTGRES_ENV_POSTGRES_DB=redmine
                               --link postgres-01:postgres redmine

Postgres data path is /var/lib/postgresql/data.

Redmine data path is /usr/src/redmine, and two important folders within this are files and plugins