The error "ERROR 1062 (23000) at line 40: Duplicate entry '1' for key 1 " you are getting is due to the database already contain the duplicate enteries (Same tables ) in the database.
The work around for this is to drop all the table from database and then restore the database backup.
NOTE:-When you restore databse backup, all the current data in the database will be over written by the databse backup data which you restore.