Restoring Database from Command Line (Docker)

Copper Contributor

Hi, I am running SQL server in docker and I have created an empty database MTA-Live from command line. I am trying to restore the database but I am getting this message.

 

smallfoot@smallfoot:~$ docker exec -it mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P password123 -Q "RESTORE DATABASE MTA_Live FROM DISK='\data\database\MTA_Live.bak' WITH REPLACE"
Msg 3038, Level 16, State 1, Server Smallfoot, Line 1
The file name "\data\database\MTA_Live.bak" is invalid as a backup device name. Reissue the BACKUP statement with a valid file name.
Msg 3013, Level 16, State 1, Server Smallfoot, Line 1
RESTORE DATABASE is terminating abnormally.

 

I am not sure what I am doing wrong. Appreciate if someone could help.

 

Thank you

0 Replies