Backup database using logical backup device in T-SQL
To use a backup device the proper T-SQL would be:
BACKUP DATABASE test_student_db
TO WEEKLY_EXPORTS;

Check the Syntax section of the Backup doc to better understand the backup options.

It seems you're trying to develop a backup solution from scratch, so I recommend you take a look at Ola Hallengren's solution as it might save you a lot of work.