Once everything is confirmed to be working, you are ready to copy any new files since you last copied them.
We use the
mirror option to save time. You can optionally define a time interval too to skip older files:
./mc mirror --overwrite --newer-than 1d2h30m -a --md5 /home/mastodon/live/public/system/ media/mastodon/
To empty out the server, we can also use the move command, but make sure to create a backup of your server's media files, in case anything should go wrong (you can skip the cache). This command does not come with an
--md5 option.
./mc mv -r /home/mastodon/live/public/system/site_uploads media/mastodata
./mc mv -r /home/mastodon/live/public/system/custom_emojis media/mastodata
./mc mv -r /home/mastodon/live/public/system/media_attachments media/mastodata
./mc mv -r /home/mastodon/live/public/system/accounts media/mastodata
./mc mv -r /home/mastodon/live/public/system/cache media/mastodata
This will still leave you with a tree of empty directories, so:
cd /home/mastodon/live/public/system
rm -rf accounts/
rm -rf cache/
rm -rf custom_emojis/
rm -rf media_attachments/
rm -rf site_uploads/
You might also have accumulated some orphans during the process, so:
su - mastodon
live/bin/tootctl media remove-orphans
exit
If you should be missing a remote status image here and there, you can restore them with the
tootctl media refresh command.
And don't forget to reactivate your relays!