「Discourse」- 论坛

discourse/discourse: A platform for community discussion. Free, open, simple.

迁移到其他主机

Move your Discourse Instance to a Different Server – howto / admins – Discourse Meta

Discourse 自带备份和恢复功能

迁移数据目录

Change Discourse install storage location – howto / sysadmin – Discourse Meta

cd /new/discourse/location
mkdir -p shared/standalone

cd /var/discourse
./launcher stop app

rsync -avzh /var/discourse/shared/standalone/ /new/discourse/location/shared/standalone

# vim app.yml
...
## The Docker container is stateless; all data is stored in /shared
volumes:
  - volume:
      host: /new/discourse/location/shared/standalone
      guest: /shared
  - volume:
      host: /new/discourse/location/shared/standalone/log/var-log
      guest: /var/log
...

// 重新构建应用

cd /var/discourse
sudo ./launcher rebuild app

// 删除旧数据目录

cd /var/discourse
sudo rm -r shared/standalone