0

I have two Mastodon v4.2.0 instances, a staging server and a live/production instance. They share an AWS S3 bucket for file storage. Both are hosted on DigitalOcean.

Is the command RAILS_ENV=production bin/tootctl media remove-orphans safe to run with this configuration? My concern is that running the command from the staging server will delete files needed by the live server.

The documentation for this command says:

Scans for files that do not belong to existing media attachments, and remove them. Please mind that some storage providers charge for the necessary API requests to list objects. Also, this operation requires iterating over every single file individually, so it will be slow.

From this I gather that the command deletes files that aren't accounted for in Mastodon's database. The problem I fear is that files accounted for by one instance's database will look like orphans to the other instance.

Am I right to fear that the remove-orphans command is not safe on an S3 bucket shared by two instances?

0

You must log in to answer this question.

Browse other questions tagged .