Migrate Server S3 as Primary Storage

Hello!
I’m finishing my installation of Nextcloud in EC2 and S3 as primary storage at AWS.
I just have one question that i couldn’t find in any documentation, that is about migration when using S3 as primary Storage.

The process consist in restore the database, config the storage in config.php and run sudo -u www-data php console.php files:scan --all?

Thanks!

that’s the idea, yes