Our Discourse site will soon be moved to a new machine, and the domain will be mapped to a new ip. Does the backup file contain all the installed plugins? Or will we have to re-install the plugin as if they had never been installed? Or does it depend on the plugin?
Backups contain only data (database and optionally upload files). The forum code + plugins are defined in the app.yml file, and you need a to use a similar app.yml on the new server to keep using the same plugins.
Have a look at Move your Discourse Instance to a Different Server.
You can transfer the ssl keys so that you have zero down time (just a bit of read-only time while you copy stuff over).