

WITH MOVE 'YourDB' TO '/var/opt/mssql/data/YourDB.mdf', This is an example: RESTORE DATABASE YourDBįROM DISK = '/var/opt/mssql/backup/YourDB.bak' So the first step is to copy the backup file to a location that the database engine has file system level access to, then use that path in the SQL scripts. The complicating factor for many in SQL Backup/Restore operations is that the paths that you specify in the SQL commands to perform the operations is relative to the server, NOT to your workstation where you are executing the command from. If you are using vscode then you are only looking for the SQL syntax/commands to complete the task, so ignore the solutions that use management studio and the UI.


Migrate a SQL Server database from Windows to Linux using backup and restore.RESTORE Statements (Transact-SQL) - SQL Server.How to: Restore Files and Filegroups (Transact-SQL).Restoring databases in MS SQL is covered extensively in the documentation and even on SO:
