Mastodon Export Media Folder: How to Reconcile With Storage
🔍 WiseChecker

Mastodon Export Media Folder: How to Reconcile With Storage

When you export your Mastodon data, the media folder often contains files you no longer see in your timeline or profile. This mismatch between the exported media archive and your current storage usage can be confusing. The cause is that Mastodon exports all media ever attached to your posts, including deleted media and cached thumbnails. This article explains why the export media folder differs from your active storage and how to reconcile the two.

Key Takeaways: Mastodon Export Media Folder vs Storage Usage

  • Preferences > Import and export > Export: Downloads all media ever attached to your posts, including deleted items and thumbnails.
  • Preferences > Account > Delete media from posts: Removes media attachments from your account but does not affect the export archive.
  • Manual folder comparison: Compare the export archive size with your instance storage quota to identify the mismatch.

ADVERTISEMENT

Why the Export Media Folder Differs From Active Storage

Mastodon’s export feature creates a complete archive of your account data. The media folder inside this archive contains every file you have ever attached to a post, including images, videos, and audio files. This includes media from posts you have deleted, media you have removed from individual posts, and cached thumbnails generated by the instance.

Your active storage usage, shown in Preferences > Account, only reflects media currently attached to visible posts. Deleted posts and their media are not counted in your active storage. Additionally, Mastodon does not delete media files from the export archive when you remove them from your timeline. The export is a snapshot of all media ever uploaded, not just what is currently live.

Another factor is that the export archive includes thumbnails and previews generated by the instance. These files are not visible in your timeline but are stored in the media folder. This can add significant size to the export, especially if you have posted many images or videos.

How Mastodon Stores Media Files

Mastodon stores each media file with a unique hash-based filename. When you upload a file, the instance saves it to a storage backend, often local disk or an object store like Amazon S3. The export process copies these files into a single folder structure. The folder names correspond to the post IDs, not the media IDs, making it difficult to map files back to specific posts without the accompanying archive metadata.

Steps to Reconcile Export Media Folder With Storage

To reconcile the export media folder with your active storage, you need to compare the export archive size against your instance quota and remove unnecessary files. Follow these steps to identify and resolve the mismatch.

  1. Download your Mastodon archive
    Go to Preferences > Import and export > Export. Click the Request your archive button. Mastodon will generate a zip file containing all your data, including the media folder. This process can take several minutes depending on your account size. You will receive a notification when the archive is ready.
  2. Extract the archive and locate the media folder
    Unzip the downloaded file. Inside the extracted folder, open the media directory. This folder contains subdirectories with numeric names corresponding to post IDs. Inside each subdirectory are the media files attached to that post.
  3. Check your active storage usage
    Go to Preferences > Account. Look for the storage usage indicator. This shows how much space your currently visible media occupies on the instance. Note the value. If the export media folder is larger, the difference is from deleted posts and cached files.
  4. Compare sizes using your operating system
    Right-click the media folder in the extracted archive and select Properties (Windows) or Get Info (macOS). The folder size appears in the dialog. Compare this with the active storage value from your Preferences page. The export folder will almost always be larger.
  5. Delete media from your account to reduce storage
    If you want to reduce your active storage, go to Preferences > Account > Delete media from posts. This removes all media attachments from your posts. The media is removed from your timeline but remains in the export archive. This action cannot be undone. Confirm the deletion in the dialog box.
  6. Request a new archive after cleaning
    After deleting media from your account, request a new export archive. The new archive will include any media you have not deleted, but it will still contain files from posts that were deleted before you removed the media. This is because the export includes all media ever uploaded, regardless of current visibility.

ADVERTISEMENT

Things to Avoid When Handling Export Media

Several common mistakes can cause confusion or data loss when reconciling export media with storage. Avoid these pitfalls.

Deleting Media From the Export Archive Directly

Do not delete files from the downloaded export archive expecting it to affect your Mastodon storage. The export archive is a static copy. Deleting files from the zip does not remove them from the instance. It only reduces the size of your local copy.

Assuming the Export Reflects Current Timeline

The export archive is not a mirror of your current timeline. It includes media from deleted posts and cached thumbnails. Always compare the export size with your active storage value, not with the visible content of your profile.

Using the Export as a Backup for Media You Want to Keep

The export archive is not a reliable backup for media you intend to keep. If you delete media from your account, the export archive still contains it. However, the instance may eventually delete the original files from its storage. Always keep separate backups of media you want to preserve.

Export Archive vs Active Storage: Size Comparison

Item Export Archive Media Folder Active Storage (Preferences > Account)
Contents All media ever uploaded, including deleted posts and cached thumbnails Media currently attached to visible posts only
Size Always larger than active storage for accounts with deleted posts Smaller, reflects only live content
Update frequency Static snapshot at time of export request Updated in real time as you post or delete
Control Cannot be modified from within Mastodon Can be reduced by deleting media from posts

The export media folder is a complete historical record. Active storage is a live view. The difference between the two is normal and expected. To reduce the export folder size, you must delete posts and their media before requesting the archive. Even then, the export will include thumbnails and metadata that add overhead.

You can now reconcile your Mastodon export media folder with your storage by comparing sizes and understanding what each contains. To keep your export archive as small as possible, delete media from posts before requesting a new export. For advanced control, consider using the Mastodon API to programmatically delete posts and their media attachments before exporting.

ADVERTISEMENT