i am sure that this below link will help you a lot.
LINK
just read and follow instruction.
here is code spinet.
To BACKUP and RESTORE DataBase through SQLCMD.EXE :
PATH OF EXE:- C:\Program Files\Microsoft SQL Server\100\Tools\binn\SQLCMD.EXE
sqlcmd -S.\SQLExpress
1> BACKUP DATABASE dbName TO DISK = 'path'
2> GO
An alternative, single-line backup command:
sqlcmd -S.\SQLExpress -Q"BACKUP DATABASE dbName TO DISK = 'path'"
(Note that you must enclose the path within quotes)
To Restore:
sqlcmd -S.\SQLExpress
1> RESTORE DATABASE dbName FROM DISK = 'path'
2> GO
For Restore with REPLACING EXISTING DATABASE
1> RESTORE DATABASE dbName FROM DISK = 'path'
2> WITH REPLACE
3> GO