Roughly based on Move your Discourse instance to a different server post. But without using the web UI. Because sysadmins prefers terminal.
IMPORTANT: Make SURE the backup dump was generated from the same Discourse version the one you’ll import it into.
Copy from host backup into shared folder. Imagine you uploaded via SSH in your host home directory.
cp ~/snapshot.tar.gz /srv/webplatform/shared/backups/
Note that the folder
/srv/webplatform/discuss/shared/standalone/backups/ from the docker host would end up to be in
/shared/backups/ inside the container.
Enter the VM, make sure enable_restore is run from
discourse cli utility
./launcher enter app discourse enable_restore
Find the mounted backup file from within the container
Make sure /shared/backups/foo.tar.gz is readable by can read
chmod o+r /shared/backups/default/foo.tar.gz discourse restore foo.tar.gz discourse disable_restore
Remap domain name
discourse remap discourse.specifiction.org discuss.webplatform.org
Then, work on user uploads and regenerate assets. That’ll make sure ;
rake uploads:clean_up rake posts:rebake
- Most helpful post Move your Discourse instance to a different server
- https://meta.discourse.org/t/multisite-configuration-with-docker/14084/32, and the referenced NGINX configuration in Discourse GitHub repo
- Work notes on WebPlatform GitHub issue tracker