Server migration from 2005 to 2012

What error message did you get? There should be no problem backing the file up and restoring it on the new server.

My notes on migrating to latest version of SQL Server are here