Can we delete content of directory uploads///tombstone

I am trying to figure way to gain more space on my discource instance.

Here is some data I collected:

  • Discourse dashboard showing 55GB used for uploads.

  • Postgresql select pg_size_pretty(sum(filesize)) from uploads showing 35 GB

  • ssh du -sh /var/discourse/shared/standalone/uploads/ showing 247G

  • ssh du -sh /var/discourse/shared/standalone/uploads/default/original/ showing 35GB

  • ssh du -sh /var/discourse/shared/standalone/uploads/tombstone/ showing 191GB

Can be that there is orphans in tombstone or it is false positive that this folder takes 191GB
When I browsing tombstone folder there is thousands of folders and files.

What kind of files discource holding in /var/discourse/shared/standalone/uploads/tombstone/ is it safe to delete these files.

1 Like

I am pretty sure you can junk all of tombstone, it is a holding ground for images that have been deleted. A place for “emergency recovery”.

In theory we should be clearing it out regularly.

Can you do a bit more research, what is the timestamp on say the oldest 10 files you have in tombstone? Are they ancient?

5 Likes

You have forgotten this query

select pg_size_pretty(sum(filesize)) from optimized_images
2 Likes

You are right optimized_images showing 20GB with which match diif from dashboard and uploads table.

Nope, if my linux commands are correct most of these files are february 2020 and so on

2 Likes

Maybe stuff is working properly and simply lots of stuff is getting deleted on your forum? You can amend the duration stuff is left in tombstone so it only stays there for a shorter time, there is a site setting for that I think.

6 Likes

In february I started fight for space, Maybe that why I did not get speace released still.
My Setting was on 30 days, when I did this lower to 10 and run sidekiq jobs regarding uploads my space , tombstone folder is now shrink.

Thank you on help, apologies for opening topic, I just did not noticed purge deleted uploads grace period days settings. Last time when I was clearing my forum it just needed to run sidekiq jobs and to return freespace to os.

Perhaps this shot be new topic: but please consider adding NEW notification in setting when something is new. For admins it is hard to keep step with all new settings, from version to version there is hard to spot and tune new settings discource offering us when we can’t find whic are newones.

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.