The process can be done in a few hours to a few days, depending on the size of the instance, everyone's availability, and the complexity afforded.
For self-hosted instances, there is a summary of the commands you would need down below.
For hosted services, you need to use the tools made available by your hosting provider, or contact them for assistance.
The archive can be a zip, tar with gzip/bzip/xz/zstd, or 7z. It may be password protected, or encrypted with PGP or age. You can send us a link to download it from your current host, or upload it to any secure file transfer service. As long as we can download it.
Notes:
# stop the instance
systemctl stop mastodon-web.service mastodon-sidekiq.service mastodon-streaming.service
# export database
sudo -u postgres pg_dump mastodon | xz > database.sql.xz
# build an archive with those files
tar -cvf my-instance.tar .env.production database.sql.xz system/public/
# clean up temporary files
rm database.sql.xz
From your instance management page, go to Tasks, select Request an Export Archive, and click Submit.
The operation will take a while (between a few seconds to a few hours). Once completed, the page will update to show you a link to the archive and its total size.
You can optionally set a PGP key under Settings to get your backup encrypted while shared.
The archive will contain:
Please note that the backup will not contain attachments as they would quickly be the biggest part; we plan on including credentials for read-only access to your current S3 bucket soon, but in the meantime please ask us to create you a full backup if you need attachments in addition to the rest.