Not 100% sure but seems like synapse does not support a built-in backup and restore as per https://github.com/matrix-org/synapse/issues/2046 . So, you have to essentially migrate databases and files manually. You will find all the necessary files in your synapse and element app backups.