Restore sqlite dump in a new Redmine installation
Added by Maciej Leks over 8 years ago
Hi All,
Context: I must migrate from the cloud to a local Redmine with my 3 projects. I've installed the latest version of Redmine on my Ubuntu 15.04. It was not a pleasant journey hence the passenger module did not want to collaborate from the start. Since my cloud provider gives '.db' dump so I've decided to choose sqlite3.
The structure of the dump (a single project) looks like that:
-Asserts (folder)
-project.db (file)
Problem: I got stuck and I really do not know what to do with that. Every tip I found relates to MySQL and IMHO it's outdated. Could you please give me a step-by-step instruction what to do, or where to find such instruction?
Maciek
Replies (1)
RE: Restore sqlite dump in a new Redmine installation - Added by Maciej Leks over 8 years ago
OK. I did it. It turns out that those three projects are placed in the same and one file origin.db
That’s the way I followed:
1. Go to /use/share/redmine
2. Change config/database.yml file as follows: production:
adapter: sqlite3
database: db/target.db
host: localhost
3. Move origin.db to db/target.db (change the .db file name if necessary)
4. Migrate db to acceptable format:sudo RAILS_ENV=production rake db:migrate
sudo RAILS_ENV=production rake redmine:load_default_data
(info: you see SQL error otherwise, e.g. no column)
5. Change rights and ownership respectively for ww-data usersudo chown www-data:www-data db/target.db
sudo chown -R www-data:www-data files db log tmp public/plugin_assets
sudo chmod -R 755 files db log tmp public/plugin_assets
(info: you see SQL error otherwise, e.g. write protection)
6. Move all Asserts/files to files folder
7. Restart apache server sudo service apache2 restart
8. Start browsing your local redmine site