you can try this query :
USE YourDatabaseName;
GO
BACKUP DATABASE YourDatabaseName
TO DISK = 'C:\YourDatabaseName.Bak'
WITH FORMAT,
MEDIANAME = 'MyBackup',
NAME = 'Full Backup';
GO
replace YourDatabaseName with the name of your database name. It will create a bak(Back up file) file at C:\\.
For more information you can refer
Database back up[
^]