How to run rake tasks?

Easiest way to do that would be:

cd /var/discourse
./launcher enter app

Just FYI, S3 migration is currently irreversible.