Project

General

Profile

How to restore Redmine backup » History » Revision 2

Revision 1 (chin-yeh, 03/12/2012 01:40 PM) → Revision 2/3 (chin-yeh, 03/12/2012 02:25 PM)

h1. How to restore Redmine backup 

 This restoration involves 2 parts, first part is to restore the application data; second part is to restore the <code>Redmine</code> database. 

 _Steps (Part 1 of 2):_ 
 # obtain the backup location from [[How to backup Redmine]] 
 # in order to restore the <code>Redmine</code>, extract the whole backup to a temporary location and search for this folder: 
 <pre> 
 opt/redmine-x.x.x 
 </pre> 
 # copy the folder, <code>redmine-x.x.x</code> and then paste it into: 
 <pre> 
 /opt 
 </pre> 
 # change the <code>folder owner</code> to: 
 <pre> 
 $ chown -R redmine:redmine /opt/redmine-x.x.x 
 </pre> 
 # done 

 _Steps (Part 2 of 2):_ 
 # search for this file, *redmine_backup.sql* in the extracted backup folder: 
 <pre> 
 opt/db_bak 
 </pre> 
 # ensure the following ports are unoccupied: 
 ** 50000 
 ** 3001 
 ** 3002 
 ** 3690 
 ** 3007 
 # login as *redmine* user and then <code>cd</code> to the <code>Redmine</code> folder: 
 <pre>$ cd /opt/redmine-x.x.x</pre> 
 # execute the following script to start the <code>Redmine</code>: 
 <pre>$ ./ctlscript.sh</pre> 
 # if started without any error, execute the following script to restore the <code>Redmine</code> database: 
 <pre> 
 $ ./use_redmine 
 $ mysql -u root -p bitnami_redmine < redmine_backup.sql 
 </pre> 
 ** _refer to the server_login.xls to get the database password_ 
 # done.