Migrate Discourse Forum to Another Server

Let’s see, how I migrated my Discourse from Vultr (old Server) to Linode (new Server)…

Prerequisite details

  1. Access to old Discourse admin account
  2. Access to domain DNS manager
  3. SSH Credentials of old and new server
  4. Transactional E-mail services login credentials.

Step 1. Create a Local Backup of old Discourse

First off, set Local Storage and must include thumbnails in Backups settings. Without this step, I had really horrible experience. I learned this hard way.

image 1
Settings

Create Backup

image 2
We will be restoring this backup at new server in the next step.

Step 2. Sign up at Linode 🎉

🎁 To get $20 Free Credits, please use promo code: podcastinit2019

image 4
Enter basic required information

Step 3. Create a New Instance at Linode

  • Distribution: Ubuntu 18.04×64
  • Region: Mumbai, India
  • Linode Plan: 1 CPU, 50GB Storage, 2GB RAM
  • Linode Label: Discourse
  • Root Password: Enter a secure password
  • SSH Keys: Select existing or generate new via PuTTyGen
create new instance linode

Step 4. Point domain to Linode Server IP

  • Use A type record for the IPV4 address
  • Use AAAA type record for the IPV6 address (Optional)
image 3

Step 5. Install Discourse at Linode

Please refer to these steps and install a new Discourse.

  1. Connect to new Server using SSH, PuTTy on Windows.
  2. Install Docker / Git
  3. Install Discourse
  4. Keep your e-mail credentials ready
  5. Setup Discourse Configuration
  6. This process may take up to 5 minutes.
  7. Confirm e-mail
  8. Login to new Discourse

Step 6. Go to Discourse Settings

Enable Allow Restore.

image 5
Enable Allow restore

Step 7. Migrate Backup file.

Connect to old server via SSH, go to backup location

cd /var/discourse/shared/standalone/backups/default & vdir

Now, you will see a backup file in tar.gz format. Note down file name.

blogging-forum-for-beginners-and-advanced-bloggers-hgk-2019-07-27-062206-v20190717133743.tar.gz
  • You need to use same file name with below SCP command.
  • Also, replace 192.168.1.1 to your own new server IP.
  • Use SCP command to copy file from old to new Cloud Server.
scp *.tar.gz [email protected]:/var/discourse/shared/standalone/backups/default

It will output like this

The authenticity of host '192.168.1.1 (139.180.139.234)' can't be established.
 ECDSA key fingerprint is SHA256:WTiKVipml0QKCjAzFyk6/fEh8/MI8K8vtv+2QZ54sc0.
 Are you sure you want to continue connecting (yes/no)?
  • Type yes and press enter key.
  • Then, Enter password
    Hint: (Do right click to enter password. Press Enter. It will be invisible, don’t worry)

Step 8. Login to new Discourse

  • Go to Backups, now you will see your backup file 😄
  • Restore the file which we brought from old server
image 6
Restore backup file

Step 9. Enable outgoing e-mails

enable email discourse

🎉 Congrats! You are done! 😊

Using S3 was costly for me. This is the most affordable and easiest way I can think off.

This process doesn’t need any local download or upload. You can save your Internet data this way.

If you liked this do share, or any question? Let me know below.

Any question? Please ask at Gulshan Forum.

Leave a Comment

2 thoughts on “Migrate Discourse Forum to Another Server”

  1. Hi. There is no step 3. You typo at (Step 2. Point domain to Linode Server IP) hehe

    Why you choose linode over vultr?

    Vultr have high frequency. Why not use it?

    Reply