Backup/restore Redmine Mysql database
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
Redmine rocks – the best issue tracking system that I know 🙂
Danilo
10/12/2010 at 16:56