How I Migrated Discourse from Vultr to Linode

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.

Settings

Create Backup

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

Enter basic required information

Step 2. 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

Step 2. Point domain to Linode Server IP

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

Step 4. 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 5. Go to Discourse Settings

Enable Allow Restore.

allow restore
Enable Allow restore

Step 6. 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 root@192.168.1.1:/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 7. Login to new Discourse

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

Step 8. Enable outgoing e-mails

🎉 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.

Leave a Comment