We’re running a bigger Discourse installation on a VPS setup that basically works very well for us. In terms of CPU/Mem performance we have headroom. Disk space though is a bit of an issue - not in the day to day business but when it comes to upgrading Postgres for example (the 13->15 Upgrade is outstanding because of that) we lack the space and can’t easily expand.
I know there are other options for the postgres update but consider this more of a general question.
We’re running on Hetzner where Network storage is easily available for temporary use.
On our test server i’m now playing around with making it work in a temporary way - first to restore a backup from the live site, later to test the Postgres Upgrade. So far I haven’t been successful.
I already tried symlinking but noticed it didn’t work and also read here somewhere that it’s not the recommended way. I have also tried moving the /shared share from /var/discourse/shared/standalone to /mnt/ext-storage/standalone and moved the files over there - unfortunately not without issues. I can’t even finish the build.
Is there any way that works for these kind of cases? I’m aware that the drive performance is much worse than the local drive but I’m not planning to run the forum on it. I’d really just like to have a comfortable way to use it for certain scenarios.
If your goal is to do the upgrade the easiest thing is to spin up a new vm and migrate to it. You skip the need to upgrade the database and you get a new os on your vm, which you likely need to do anyway.
Actually this is not an option. It’s not running out of space for day to day needs anyways. Also we’re on a 600gb drive space right now and using ~50%. There is not a bigger option - at least not on Hetzner.
That’s why i explicitly was asking for the external drive.
It can be handy to keep your uploads, or, say /var/discourse/shared/web_only on network storage. You need to edit the yml file to point to it rather than use a symlink (the symlink doesn’t work because the container can’t access the place that your symlink points to.
Then if you do move to a new vm, you can just remount that network storage rather than copy it over.
I don’t recommend network storage for the database since it’s slower.
I think it’s worthwhile breaking down what your usage is. Your actual database size might not be so large, if most of your usage is uploads, and it’s only the database part which demands maybe 3x space during upgrade.
One thing you can check is the relative size of a backup with downloads compared to a backup without downloads.
Or, use the command line. Here’s some output from my rather small forum:
I think it’s supposed to. I am not clear what triggers it. I think doing an extra one doesn’t hurt and might save you some space. It’s recommended after you do the upgrade if you do it in place. I’ve seen it clean up considerable space a few times.
If your database is 230GB, I’d definitely restore it to a new server. Downtime reading and writing 230GB is going to be significant.