Trac -> redming migration fails
Added by el cuco about 15 years ago
I am trying to migrate a 3 years old trac (lots of info) to redmine. I am using the latest 0.8 branch from svn, and DebianTesting as the operating system. I admit this machine is not "heavy", but it does have 512mb and as much disk as you need (40gb...). I added 5gb of swap file. I know you think this will slow down my process due to swapping - but speed is not a factor in this migration (let it take 5 hours, who cares? I can run it at night).
The problem is that during the migration the conversion utility dies saying that it could not allocate memory. I am pretty sure that the machine has enough memory (I added 5gb swap).The script runs for several minutes (the ruby process takes about 1.2gb of ram) and I see this:
Migrating components............................ Migrating milestones................. Migrating custom fields.. Migrating tickets............................(TRIMMED DOTS)...................................rake aborted! failed to allocate memory (See full trace by running task with --trace)
BTW, is there a way to pass command line arguments this command? It's very interactive and I am looking for a non-interactive way of running it.
Replies (2)
RE: Trac -> redming migration fails - Added by el cuco about 15 years ago
yay... more details
................................rake aborted! failed to allocate memory /root/redmine-0.8/lib/tasks/migrate_from_trac.rake:313:in `[]=' /root/redmine-0.8/lib/tasks/migrate_from_trac.rake:313:in `convert_wiki_text' /root/redmine-0.8/lib/tasks/migrate_from_trac.rake:311:in `gsub' /root/redmine-0.8/lib/tasks/migrate_from_trac.rake:311:in `convert_wiki_text' /root/redmine-0.8/lib/tasks/migrate_from_trac.rake:491:in `migrate' /root/redmine-0.8/lib/tasks/migrate_from_trac.rake:486:in `each' /root/redmine-0.8/lib/tasks/migrate_from_trac.rake:486:in `migrate' /root/redmine-0.8/lib/tasks/migrate_from_trac.rake:461:in `each' /root/redmine-0.8/lib/tasks/migrate_from_trac.rake:461:in `migrate' /root/redmine-0.8/lib/tasks/migrate_from_trac.rake:758 /usr/lib/ruby/1.8/rake.rb:636:in `call' /usr/lib/ruby/1.8/rake.rb:636:in `execute' /usr/lib/ruby/1.8/rake.rb:631:in `each' /usr/lib/ruby/1.8/rake.rb:631:in `execute' /usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain' /usr/lib/ruby/1.8/rake.rb:583:in `invoke' /usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task' /usr/lib/ruby/1.8/rake.rb:2029:in `top_level' /usr/lib/ruby/1.8/rake.rb:2029:in `each' /usr/lib/ruby/1.8/rake.rb:2029:in `top_level' /usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:2023:in `top_level' /usr/lib/ruby/1.8/rake.rb:2001:in `run' /usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1998:in `run' /usr/bin/rake:28 real 8m44.004s user 2m44.798s sys 0m17.377s turing:~#
RE: Trac -> redming migration fails - Added by el cuco about 15 years ago
even more info! yes!
I removed some functionality, and now the migration ended. I assume the ticket renumbering could be done "smarter", but I just removed it:
turing:~/redmine-0.8# svn diff Index: lib/tasks/migrate_from_trac.rake =================================================================== --- lib/tasks/migrate_from_trac.rake (revision 2903) +++ lib/tasks/migrate_from_trac.rake (working copy) @@ -309,12 +309,12 @@ text = text.gsub(/\[(\d+)\]/, 'r\1') # Ticket number re-writing text = text.gsub(/#(\d+)/) do |s| - if $1.length < 10 - TICKET_MAP[$1.to_i] ||= $1 - "\##{TICKET_MAP[$1.to_i] || $1}" - else - s - end +# if $1.length < 10 +# TICKET_MAP[$1.to_i] ||= $1 +# "\##{TICKET_MAP[$1.to_i] || $1}" +# else +# s +# end end # We would like to convert the Code highlighting too # This will go into the next line.