Created
March 31, 2020 20:19
-
-
Save Guidhouse/17ffdfea3c83cc6df7fe725eee562d61 to your computer and use it in GitHub Desktop.
Restore to SqlServer on Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [master] | |
--Get logical names first | |
EXEC sp_restore_filelistonly | |
@device_type = 'DISK', | |
@backup_path = '/var/opt/mssql/data/DB.bak' | |
--Then restore | |
RESTORE DATABASE MarcRecordsDB | |
FROM DISK = '/var/opt/mssql/data/DB.bak' | |
WITH MOVE 'DB' TO '/var/opt/mssql/data/DB.mdf', | |
MOVE 'DB_log' TO '/var/opt/mssql/data/DB_log.ldf' | |
--STATS = 10 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment