docker run -v /home/marco:/backup --rm svarcoe/mssql-scripter mssql-scripter -S 172.18.0.3 -d CMUCE -U sa -P CMuce1970@ --schema-and-data -f /backup/mssql-scripter-CMUCE.sql # BACKUP: BACKUP DATABASE [YourDB] TO DISK = N'C:\xxxxx or /var/opt/mssql/backup/YourDB.bak' WITH NOFORMAT, NOINIT, NAME = N'YourDB-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO # RESTORE: sqlcmd -S localhost -U SA RESTORE DATABASE YourDB FROM DISK = '/var/opt/mssql/backup/YourDB.bak' WITH MOVE 'YourDB' TO '/var/opt/mssql/data/YourDB.mdf', MOVE 'YourDB_Log' TO '/var/opt/mssql/data/YourDB_Log.ldf' GO
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter