Tu un-delete a topic, open it, click the wrench icon and select
`Un-delete topic`.
### Permanently destroy a topic
If a topic needs to be purged from Discourse, this can be accomplished using the
Rails console as follows, using the numeric topic identifier:
Topic.find(topic_id).destroy
These instructions are copied from [this post](https://meta.discourse.org/t/how-can-i-delete-or-undelete-topics/41700/9)
on the Discourse Meta forum.
In case of a major problem with the forum, we should contact the Discourse
### Enter the Discourse container
people at team@discourse.org. They have access to offsite backups.
Manual backups can be triggered and retrieved via the web interface,
It's possible to enter the Discourse container to look around, make
see [Backups](#backups). Such backups could then be used to recreate the
modifications, and restart the Discourse daemon itself.
forum on another installation of Discourse, in case of a catastrophe.
cd /srv/discourse
./launcher enter app
Any changes made in the container will be lost on upgrades, or when the
container is rebuilt using `./launcher rebuild app`.
Within the container its possible to restart the Discourse daemon using:
sv restart unicorn
## Disaster recovery
# Reference
# Reference
## Installation
## Installation
The forum software was installed for us by the Discourse team, in their cloud
Our installation is modeled after upstream's [recommended procedure] for
infrastructure, so the only thing that needed to be set up from our side was a
deploying a single-server Docker-based instance of Discourse.
DNS entry.
The address chosen for this service is https://forum.torproject.net/.
First, a [new machine] is required, with the following parameters:
It was decided to use the `.net` suffix instead of `.org` per [TPA-RFC-6](https://gitlab.torproject.org/tpo/tpa/team/-/wikis/policy/tpa-rfc-6-naming-convention).
- an 80GB SSD-backed volume for container images and user uploads
- a 20GB NVMe-backed volume for the database
### Domain rediection
Directories and mounts should be configured in the following manner:
For convenience, a HTTP redirection is set up in our infrastructure pointing
Internally, Discourse has a `force_https` setting which determines whether
links are generated using the `http` or `https` scheme, and affects CSP URLs.
When this is enabled, the forum does not work using the onion service because
CSP URLs in the headers sent by Discourse are generated with the `https`
scheme. When the parameter is disabled, the main issue is that the links in
notifications all use the `http` scheme.
This service is hosted by Discourse.org which handle creating and storing
So the most straightforward fix is simply to serve the forum via `https` on the
backups for the forum:
onion service, that way we can leave the `force_https` setting enabled, and the
CSP headers don't prevent forum pages from loading.
> Off-site backups are created every 12 hours when hosted by Discourse. To access an off-site backup, or to restore an uploaded backup, please [contact us](mailto:team@discourse.org).
## Directory structure
It's possible to trigger the creation of a downloadable backup via this [page](https://forum.torproject.net/admin/backups)
The purpose of the various directories under `/srv/discourse` is described in
on the admin interface. Once the backup is completed, a download link is sent by
the [discourse_docker README](https://github.com/discourse/discourse_docker#directory-structure).
email to the admin who requested the backup.
## Deleting topics and posts
The most important directories are:
The design of Discourse is such that when a post is deleted via the web