nazmun
October 25, 2024, 1:52pm
1
I have a Discourse forum, and I want to move it to a new server running AlmaLinux. I want to keep all my data, like posts and user accounts.
Right now, Discourse is installed with Docker on my old server, but I’m unsure how to set it up on the new server without losing any data. What is the best way to do this?
1. Backup Your Current Discourse Site
Go to Admin > Backups and click Backup .
Wait for the backup to complete, then download it to your local computer.
2. Set Up Discourse on the New Server
Follow the guide below to install the discourse.
How to install Discourse on AlmaLinux?
3. Install Plugins on the New Server (Optional)
If you are using any plugin in discourse then you need to set them in your app.yml
file in the new server.
cd /var/discourse
vi containers/app.yml
Add the plugin’s repository URL.
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- sudo -E -u discourse git clone https://github.com/discourse/docker_manager.git
- sudo -E -u discourse git clone https://github.com/discourse/discourse-solved.git
After you add the plugins, rebuild the Discourse app to make sure the plugins are installed.
cd /var/discourse
./launcher rebuild app
4. Restore Backup on the New Server
Go to Admin > Backups on the new server and restore your backup file that you downloaded.
This way, your Discourse site with all plugins should be up and running on your new AlmaLinux server.