I have a discourse board on digital ocean droplet.
Disk size is 160 Gb (45 free now). My site is using a lot of space for uploads (40 Gb). What’s the best choice to move uploads? Any suggestions? S3, spaces on digital ocean? What else?
In my opinion, its just personal preference.
When last did you do a
./launcher cleanup ? That should clean up some space for you.
Have a look at Using Object Storage for Uploads (S3 & Clones). If you know how to make aws work, it’s the best supported and most reliable. Spaces has had some technical difficulties a few times, but maybe they’ve figured it out now.
I moved someone to spaces and bunny.net last week and it went smoothly.
I set up a S3 bucket for uploads and backups, it works fine. I haven’t create a CDN. May that be a problem? Any suggestion? Should I move old uploads to s3 doing rake?
I set up cloudfront on AWS. It seems that’s work fine.
I’ll check next few days.
Last things to do:
Stop the discourse board - Snapshot on DO
Edit yml file
Rebuild and test
./launcher enter app
How long will it take to upload 37 GB and rebake all posts?
How long it will take depends on a lot of factors. Most likely S3 will happily receive your upload at whatever speed your server can send it, minus some overheads. On a 1Gbit link that’s probably going to be ~5 minutes.
Rebaking and resulting jobs are likely where the vast majority of time will be spent. How long this will take could vary wildly by how many posts your instance has, how much and what kind of content posts typically have and the clock speed of your server’s CPU. How long the resulting jobs take will somewhat depend on the same things as well as how many CPU cores are available.
My understanding (someone please correct me if wrong) of the migrate to S3 process and the rebaking is that the existing uploads won’t be removed until some point after they have been disassociated with the post (after the rebake has done that post) so the instance can continue being used without missing uploads while the migrate and rebake are happening.
If you’re on a virtual server with only one core available, it might be worth considering upgrading to more cores for the rebake and then downgrading after it’s complete. The process will take significantly longer on a single core and Discourse performance may be severely affected during it.
probably I’ll turn the board in read only mode while uploading data to S3.