Added note about db:migrate step failure and improved formatting

This commit is contained in:
Michael Schmatz 2014-01-30 10:55:43 -08:00
parent bfddc5a191
commit 8eedfd6c70
1 changed files with 11 additions and 7 deletions

View File

@ -44,24 +44,28 @@ config/database.yml (as per the upgrade instructions)
Take DB dump with:
pg_dump --no-owner -U user_name -W database_name
pg_dump --no-owner -U user_name -W database_name > backup_file_name.sql
Copy it over to the new server
Run as discourse user:
* createdb discourse_prod
* psql discourse_prod
* \i discourse_dump_from_old_server.sql
```
createdb discourse_prod
psql discourse_prod
\i discourse_dump_from_old_server.sql
```
On oldserver:
* rsync -avz -e ssh public newserver:public
`rsync -avz -e ssh public newserver:public`
On the new server:
```
bundle install --without test --deployment
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production rake db:migrate
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production rake assets:precompile
RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production rake posts:rebake
```
If the `rake db:migrate` step fails, you might have to run it twice.
Are you just testing your migration? Disable outgoing email by changing
`config/environments/production.rb` and adding the following below the mail