Azitech

Azimout's Linux weblog

Backup/restore Redmine Mysql database

with one comment

To backup a Redmine installation, you need to dump its database and attachments. I’m using MySQL, so the command is:

mysqldump -u root -p'mysql_root_password' redmine_default | gzip > $BACKUP_PATH/redmine_mysql.gz

UPDATE 03.02.2011: If the two databases have been forked and you want to merge them, add the following parameters to mysqldump: --skip-add-drop-table --no-create-info --replace

The attachments are installed under /var/lib/redmine/default/files. To put them into an archive (and back them up) run the following:

sudo tar zcPf $BACKUP_PATH/redmine_attachments.tar.gz /var/lib/redmine/default/files

 


Then, to restore the MySQL, the command is:

 

gzip -c -d $BACKUP_PATH/redmine_mysql.gz | mysql -u root -p redmine_default

And to extract the attachments run:

sudo tar xvPf $BACKUP_PATH/redmine_attachments.tar.gz

Reference: http://www.redmine.org/wiki/1/RedmineUpgrade

Written by azimout

26/11/2010 at 09:42

Posted in Howto

One Response

Subscribe to comments with RSS.

  1. Redmine rocks – the best issue tracking system that I know 🙂

    Danilo

    10/12/2010 at 16:56


Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.