If you are just migrating the app server and not the database server, your tasks should be in the same status after migrating and upgrade of ActiveVOS server.
Please ensure that you do a graceful shutdown of the app server rather than going for a kill process.
We need to change the MDM Database server as well. So how do we do it?
As long as the Database ORS ID is not modified, you should be able to migrate the tasks.
Can you please provide more details on your use case as to how you plan to migrate DB Server?