# Help Needed Migrating Discourse Forum to New Shanghai Server – db:migrate Error

**URL:** https://meta.discourse.org/t/help-needed-migrating-discourse-forum-to-new-shanghai-server-db-migrate-error/344637
**Category:** Support
**Created:** [December 28, 2024, 5:57am UTC](https://meta.discourse.org/t/help-needed-migrating-discourse-forum-to-new-shanghai-server-db-migrate-error/344637 "2024-12-28T05:57:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![qingfeng1024](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/qingfeng1024/32/495412_2.png) [@qingfeng1024](https://meta.discourse.org/u/qingfeng1024)
#### Post date: [December 28, 2024, 5:57am UTC](https://meta.discourse.org/t/help-needed-migrating-discourse-forum-to-new-shanghai-server-db-migrate-error/344637/1 "2024-12-28T05:57:04Z")

</div>

Hello everyone,

I am attempting to migrate my Discourse forum to a new server located in Shanghai, but I’ve encountered an issue that I can’t resolve and would greatly appreciate your assistance.

Here is what I have done so far:

1. **Code Cloning:** I cloned the Discourse repository on the new server using Git.

2. **Configuration Files:**

• I created a new app.yml file in the /var/discourse/container directory.

• I copied the contents of the app.yml file from my old server and pasted them into the new app.yml on the new server.

1. **Backup Files:** I manually uploaded the backup file from the old server to the backup folder on the new server.

2. **Running Diagnostics:** I executed the ./discourse-doctor command to check and fix configurations.

However, when I run ./discourse-doctor, I receive the following error:

> FAILED
> 
> * * *
> 
> Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate’failed with return #\<Process::Status: pid 1835 exit 1\>
> 
> Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec\_command.rb:132:in `spawn’
> 
> exec failed with the params {“cd”=\>“$home”, “tag”=\>“migrate”, “hook”=\>“db\_migrate”, “cmd”=\>[“su discourse -c ‘bundle exec rake db:migrate’”]}
> 
> bootstrap failed with exit code 1
> 
> \*\* FAILED TO BOOTSTRAP \*\* please scroll up and look for earlier error messages, there may be more than one.
> 
> ./discourse-doctor may help diagnose the problem.
> 
> b2af39f0849bd60c3ce1b9f1ebe1c33a47fcea20edce2233171da420d4730323

**Additional Information:**

• **Backup Method:** Used Discourse’s built-in backup feature to export a tar.gz file

I am unsure what is causing the db:migrate error and how to proceed. Could anyone provide insights into the possible reasons for this error and suggest steps to resolve it? Additionally, any tips or common pitfalls to watch out for when migrating a Discourse forum would be highly appreciated.

Thank you very much for your help!

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [December 28, 2024, 8:26am UTC](https://meta.discourse.org/t/help-needed-migrating-discourse-forum-to-new-shanghai-server-db-migrate-error/344637/2 "2024-12-28T08:26:52Z")

</div>

Did you follow this guide?

> [@Move your Discourse Instance to a Different Server](https://meta.discourse.org/t/move-your-discourse-instance-to-a-different-server/15721):
>
> bookmark This is a guide for moving your Discourse instance from one server to another, including all settings and data. This guide applies to self-hosted Discourse instances using Docker. person_raising_hand Required user level: System Administrator warning This procedure involves domain and DNS changes. Ensure you have access to both the source and destination servers. This guide walks you through the process of migrating your Discourse instance from one server to another, ensuring …
