Forum is disappearing 😳 Backup size consistently decreasing over time

AI-generated summary

The forum’s backup size is consistently decreasing over time, with some uploads disappearing. wil93 initially reported the issue, providing examples of missing videos and images. CocoQuark suggested investigating the server setup and upload settings. Ed_S compared two backup files and found changes in the SQL dump, but noted that log pruning could be a factor. Ed_S later suggested that the upload storage might be being aggressively pruned. RGJ recommended disabling the “clean up uploads” setting and checking the size of the public/uploads/tombstone directory, also inquiring about the forum’s import history. The cause of the issue is still unknown, but it is suspected that the upload storage is being pruned, resulting in missing files.

I noticed that the backups are gradually decreasing in size, and some uploads are starting to disappear.

For example in this post there should be a video, but it doesn’t play anymore and indeed is missing from the backups.

Any idea what’s happening?

It’s still decreasing… does anyone have an idea what this could be?

Are your files stored on the same server as Discourse? Do you have any custom setup? Did you review your uploads’ settings, and the staff actions to see if any upload-related setting was changed?

If this happened to me, I would take two of those backup files, list their respective contents, and compare the two lists.

In fact I did that, found a small difference in size, and found I had 4 new jpeg image files, and a very slightly smaller dump.sql.gz.

So I extracted and decompressed the two SQL dump files and compared them. Unfortunately there are some 35k additional lines and 85k removed lines, and I haven’t yet thought of a very quick way to see what’s going on. In size terms, my SQL dump from 12th December has uncompressed size 349Mbyte(*), and from 14th December 344Mbyte. (It’s not a terribly large forum.)

However, I notice that the database contains a lot of logs: logs of emails sent, logs of sidekiq jobs completed (maybe), and if those logs are pruned to say a 30 day history then the sizes of those logs will fluctuate according to what was happening 30 days ago.

Which is all to say, there might be no need for concern. But you might need to investigate and compare two backups to find out.

(*) Oops, originally I typoed this as 394, which would mean a much bigger difference.

I notice the HTML for this video shows a 404 and references an upload:// URL. It does seem likely that somehow your upload storage is being aggressively pruned, by something.

Start by disabling Settings - Files - clean up uploads ASAP.

How large is your public/uploads/tombstone directory?

Was your forum previously imported from another forum software?