All you need is:
have the old collection (after back up) on the sql server.
TFS 2012 installed and configured to the sql server
press attach ( migration process start automatically). process takes about 1 hour and 10 minutes.
I know I've done this from 2008->2010->2012 you can check: migrate data from TFS 2008 to an already working TFS 2012