We are creating a new sharepoint site in Sharepoint 2013 and migrating content from the old site with Sharepoint 2007. The problem is we need to retain version history for files and also modified date. Is there any method how to do it?
write a powershellscript that Iterate throuh your site collection and all the spweb objects and all the document libs and splists , announcements , issue tracer lists , discussion forums etc like objects and fetch all the docs having versions and insert into the target 2013 site collection objects.
you first need to create the similar structure in the sp 2013 site collec. when compared to your MOSS 2007 site.
you didnt tell anything about any other details about your environment, this is required , as yours is a migration project. then run the powershell script for the same.
if your customer is ready to buy 3rd party tools , the go for metalogix or sharegate kind of tools that will help you to ease your pain in migration. usually migration is a painful activity. Share-Gate has 15 days trial, so try it.
Another approach is , take the content db backup from SQL server and migrate it to a SP 2010 content database and then from SP 2010 content db to SP 2013 content database. you need to use SQL SERVER 2012 for the SP 2013 environment.