Project

General

Profile

restore redmine server from backup

Added by Justin Edmands almost 10 years ago

We run a turnkey linux install of redmine. The virtual machine was deleted and we are left with an OS level backup. I fired up a new turnkey redmine, with the same version as before, and put a live CD in. After mounting the stock OS drive, I deleted everything and dropped the backup in place(maintaining the fstab). After this the turnkey appliance boots up fine, but redmine doesn't run. mysql starts just fine(no errors at least), but I get the following Passenger error:

There appears to be a database problem.
Your application's database configuration file might be written incorrectly. Please check it and fix any errors.
The database server may not be running. Please check whether it's running, and start it if it isn't.
Error message:
Mysql::Error: Unknown table engine 'InnoDB': SHOW CREATE TABLE `issue_relations` (ActiveRecord::StatementInvalid)
Exception class:
ActiveRecord::StatementInvalid
Application root:
/var/www/redmine

I cannot get any further. Any ideas? I created a new virtual machine instance to possibly port over the databases or whatever is needed.


Replies (1)

RE: restore redmine server from backup - Added by Justin Edmands almost 10 years ago

For any who stumble upon this:

Solution:
Delete the /var/lib/mysql/ib_logfile0 and ib_logfile1 files and restart mysql.

As long as you have the exact turnkey VMDK that originally hosted your server, you can perforn this recovery successfully.

- Deploy fresh redmine turnkey virtual machine
- Attach LiveCD (centos 6 worked for me)
- mkdir /mnt/turnkey-root ; mount /dev/mapper/turnkey-root(or whatever) /mnt/turnkey-root
- cd /mnt/turnkey-root
- cp etc/fstab /home/centoslive/Desktop
- rsync -av root
(backup server):/mnt/(backupmount)/(redmine restored OS from backup)/* .
- cp /home/centoslive/Desktop/fstab /mnt/turnkey-root/etc/fstab
- mv /mnt/turnkey-root/var/lib/mysql/ib_logfile0{,.bak}
- mv /mnt/turnkey-root/var/lib/mysql/ib_logfile1{,.bak}
- Reboot
- Boot off OS (remove LiveCD)

    (1-1/1)