Can I pack the server and move it to another server?


(steven_yue) #1

Hi, guys

I have successfully installed a discourse instance on a Digital Ocean server.

Now I need to host my discourse in China, but due to the ‘Great Wall’, it’s so hard to build a docker image from that server, the connection problems is killing me.

My question is: can I pack the existing instance on my Digital Ocean server, and transfer the data to the new server by myself, and start hosting from there?

I want to skip the ./launcher bootstrap app step and directly go to ./launcher start app?

Migrating from one Docker server to another
(Clay Heaton) #2

I’ve been wondering about this just from the perspective of moving to an upgraded internal server.

(Kane York) #3

Hm, that’s a good question!

I do remember the team saying something about how they ship docker images from one machine to another when they deploy Meta and the other hosted sites? I’m also curious about how that works.

(Sam Saffron) #4

it should work, you can also simply use docker save and docker load to move the images around so it does not need to download all that stuff.


So just to be clear, it would work for me to simply tar up /var/discourse and scp it to another server and untar it there?

Or, if I use @sam’s docker save anddocker load , what exactly does the load command do? Will it re-create my /var/discourse directory on the new server?

(Kane York) #6

No - go to /admin/backups on your Discourse install. Take a backup, install Discourse on the new server, restore the backup there. (Then ./launcher restart app)

Nope, that’s not quite correct. docker save/load is for managing ‘images’ (which are disposable), not your database.

If you head to /admin/backups in your install, you’ll see what to do.

Move your Discourse Instance to a Different Server

Thanks for the reply. Is it possible to create and restore backups on the server side? I was looking for something that would save me some time by doing everything between the two VPS that I’m migrating between, instead of me using my drastically slower internet connection to download/upload the backup file.

EDIT: I was also thinking that in the case of users that are migrating because of disk space limitations on the original server, they might not have enough space to generate the backup file.

(Kane York) #8

You can use scp to transfer the file if downloading it is prohibitive. It’s in /var/discourse/shared/standalone/backups/default on both servers. Take the backup, scp it to the other server, restore it there.


Works great, thanks very much!


Just to clarify on this, what’s the best approach to move your Discourse install to a new server?

  1. Backup (using Discourse), install the new server (including Docker), Restore (using Discourse)
  2. Docker Save, SCP /var/Discourse/* to the new Server, Docker Load, ./launcher rebuild?

I’m confused about what could be used from Docker to this, in particular when you have a multisite installation.

(Sam Saffron) #11

Backup using discourse

(Jeff Atwood) #12

Follow the existing howto topic on this.


If I’m moving VPS, Why do I need to rebuild everything? The idea of docker is exactly that. In theory, if I sync:

  • /var/discourse/* with the new server
  • and Docker Load all the containers

The forum should be running. Am I correct?

(Kane York) #14

No, because the database is stored outside of Docker. Which includes all your posts and stuff.

The database is what’s included in a backup. The contents of the container can be thrown away.

(Robin Ward) #15

However it is located in /var/discourse which he said he’d copy over. I don’t see why this wouldn’t work.

(Michael Downey) #16

A HOWTO on this (preferably tested!!) would be invaluable for people trying to do it …

(Jeff Atwood) #17

There already is a howto on this.

(Michael Downey) #18

Really? I only found this, which is not what’s being discussed here:

(Jeff Atwood) #19

Seems the same to me. I guess the arbitrary restriction in this case is “I can’t do a build because the Chinese firewall blocks so much stuff”.

(Michael Downey) #20

One is further up the stack than the other.

It seems like it’s a lot simpler to move the whole installation (filesystem + docker) rather than having to re-install and export-import data (which is what the HOWTO is).