Simple summary of how to move Discourse to a larger disk

AI-generated summary

The discussion addresses how to move a self-hosted Discourse instance to a larger disk, specifically a Digital Ocean block storage volume on the same server. Andro initially sought instructions after running out of space, noting that launcher could not rebuild due to insufficient capacity. NateDhaliwal provided links to existing guides, but Andro clarified they wanted to move the entire instance, not just uploads and backups.

NateDhaliwal suggested moving /var/discourse/shared to the new volume while keeping postgres_data on the main drive for performance, providing specific commands to move directories and edit app.yml. However, Andro suspected the database was the primary space consumer and did not prioritize high performance. In response, EthsIm2 recommended trying docker system prune for broader cleanup. Ed_S advised measuring actual disk usage before proceeding, suggesting commands like df -h /, du -kx /, and docker system df to identify whether the space is consumed by uploads, databases, logs, or other Docker artifacts.

Are there instructions for how to move an entire Discourse instance to another disk, e.g. a block storage volume from Digital Ocean? I have a self hosted Docker image. There’s some info here about it but its a bit tangled up with other discussion. I am out of space and launcher wont rebuild for that reason, even after trying to remove images.

See:

and:

Not exactly my case. I want to move the Discourse instance to block storage on the same server. I do not want to move to a new server. And I want to move all, not just uploads and backups. Sorry to need so much handholding! I don’t want to mess this up.

Then I think you’d want to look at the first doc I linked. Essentially you would move the uploads and backups to the mounted disk, but keep the database on the main drive.

So unless I’m misunderstanding, this is what you’re trying to do? (And of course, please take a backup before doing this)

I have not checked but I thought its the database taking up the space, and need ing moving. High performance is not a consideration.

have you tried a broader Docker cleanup using docker system prune, rather than just removing images?

Best to start by measuring and sharing your measurements - you might well be right about the best way to proceed, but let’s see the shape of things.

Although the docker prune is a good idea too.

The size of the disk:

df -h /

And the usage of that disk right now:

And the usage by docker:

docker system df
docker images -a
docker image ls
docker volume ls -qf dangling=true

(I’m not a docker expert - that’s probably a bit redundant, but with all of those outputs we should be able to see the docker use)

Overall, your disk usage will be a combination of

  • the operating system
  • swap files
  • various log files
  • your discourse software
  • your backups
  • your database
  • your forum uploads

For many forums, the uploads are the big chunk. But one must measure!

If you’re not an expert linux sysadmin, there will probably be some extra unneeded older things too.