Move+Upgrade
Added by Serg Zhum about 13 years ago
Hello!
I have Redmine 0.8.4.stable (MySQL) installed. It works fine, but I need to move it on other site and upgrade to 1.2.0. This installation is TurnKey virtual machine, but new instance will be on real machine. I can do mysqldump from old installation, but I am not sure, that I can copy the installation for upgrade...
If anyone can tell me how to do right backup to upgrade it on new site or how to copy old data to new installation, please tell me. Now all my tries had failed...
Replies (2)
RE: Move+Upgrade
-
Added by Serg Zhum about 13 years ago
Addition. The most successfull attempt was tar-ing /var/www/rails_app dir on old (0.8.4) site, dumping database, then untar-ing in on /var/www/redmine.old on new site, restoring database. Then I downloaded latest redmine (1.2.1), untared it in /var/www/redmine, copied config/{email,database}.yml from old, copied files dir from old to new.
Then I ran rake config/initializers/session_store.rb and rake generate_session_store.
Next step must be rake db:migrate RAILS_ENV=production, but it fails:
# rake db:migrate RAILS_ENV=production NOTE: SourceIndex.new(hash) is deprecated; From /var/www/redmine/config/../vendor/rails/railties/lib/rails/vendor_gem_source_index.rb:100:in `new'. rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+) WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use 'task :t, [args] => [deps]' instead. at /var/www/redmine/lib/tasks/email.rake:170 == AddCustomFieldsEditable: migrating ======================================== -- add_column(:custom_fields, :editable, :boolean, {:default=>true}) -> 0.1325s == AddCustomFieldsEditable: migrated (0.1327s) =============================== == SetCustomFieldsEditable: migrating ======================================== == SetCustomFieldsEditable: migrated (0.0155s) =============================== == AddProjectsLftAndRgt: migrating =========================================== -- add_column(:projects, :lft, :integer) -> 0.0994s -- add_column(:projects, :rgt, :integer) -> 0.0999s == AddProjectsLftAndRgt: migrated (0.1995s) ================================== == BuildProjectsTree: migrating ============================================== rake aborted! An error has occurred, all later migrations canceled: Validation failed: repository is invalid Tasks: TOP => db:migrate (See full trace by running task with --trace)
How can I fix it? May be there is another way to upgrade?
RE: Move+Upgrade
-
Added by Dmitriy P almost 13 years ago
Howdy,
It looks like this line "Validation failed: repository is invalid" is referring to the repository module (as in SVN, GIT, etc). The file that's throwing it is probably ./app/models/repository.rb
I had the same issue and solved it by deleting everything from the "repositories" table in the database: truncate repositories;
(needless to say, be sure you have a backup of the database before doing this)
After you upgrade, you can go in and re-add the repositories to the projects manually.