Migrate / Upgrade error
Added by Andre Schoonbee over 14 years ago
Hi All
Due to a major server crash, I lost my current redmine system (ver 0.8). Well, I installed a new Bitnami vmware application and it works great. I luckily had a mysql backup of my old redmine files and then tried to upload that onto the new server. It did not work, due to changes in the schema. SO I then compared the 2 schema s and made sure the old data meet the new db schema. I then could load the dumpfiles without any errors. But to start with, the system comes up 100% but not all users are on the new server. I also get an error when trying to open the project.
The error I get is:
"Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your redMine administrator for assistance. "
I have double checked to make sure the fields a for projects and users are 100% correct but still have this problem!
Please help me!!
Replies (3)
RE: Migrate / Upgrade error - Added by Felix Schäfer over 14 years ago
That's not the proper way for an upgrade. Re-load your pristine old data, point a fresh redmine installation to it a run RAILS_ENV=production rake db:migrate
to migrate the database to the right version (it's not only about the schema). Follow the rest of the upgrade guide from there. Do you also have the contents of the files
directory from the old install? If not, you have pretty much lost all attached files.
RE: Migrate / Upgrade error - Added by Andre Schoonbee over 14 years ago
Thanks for the feedback, but I am still somewhat lost.
From the old corrupt server, I copied the db, files, email.yml and database.yml files/folders. The old server was running an older version of Redmine. I then downloaded a new vmware application (Bitnami Redmine) so it's up an running. Now I need to load my old data onto the new server.
Shall I merely replace on the new server the email.yml, and database.yml files then run rake command? I also have copied the files folder to the new server. But what about the rails files?
RE: Migrate / Upgrade error - Added by Felix Schäfer over 14 years ago
Not sure how much stuff BitNami changes, but I'll describe it the best I can wrt a stock install.
First, the easy stuff: the files
directory and the config/email.yml
, those you can just replace in the installation, the format and syntax of email.yml
shouldn't have changed, and the files in files
are referenced in the DB, so no worries there.
Now the DB, the schema of the DB is versioned (sort of at least), and these versions are migrations. Each migration is an atomic (or should be somewhat atomic at least) change that contains the needed information to go up one version, but also on how to roll back the changes to the DB. A migration is not necessarily only a case of schema update, it might also contain other stuff, e.g. some redmine command to put existing projects in a newly introduced tree. So much for theory. Now, what you have is a DB in an older version than redmine is, so you need to migrate your database up to the version your redmine installation expects. The already shipped database is of no use to you in that case, you will have to reload your whole DB as it was when you dumped it (in an empty DB!) and point your redmine to it by editing config/database.yml
. At that point, it won't be usable because the reloaded DB has an old version, to migrate it up you will need to run RAILS_ENV=production rake db:migrate
in your redmine directory, that will apply the migrations needed to get your DB up to the version the redmine installation expects. After that, see in the upgrade guide if there's any mention of clearing caches and stuff, restart whatever server serves redmine in bitnami, and you should be good to go.