Hi Vipa,
Alfresco uses both database and file system to store your content, it always maintains synchronisation between these two entity.
Whenever you are migrating your stack you should first take back up of your file system which is present in "alf_data" folder in your system and take database dump of your current DB which you are using. You can find this in foemation in "alfresco.global.properties" file present in your alfresco installation.
Hope this will sort your auery.
Thanks