Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo docker exec -it sql1 /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '<YourStrong!Passw0rd>' -Q 'BACKUP DATABASE [demodb] TO DISK = "/var/opt/mssql/data/demodb_LogBackup.bak" WITH STATS = 10'
- sudo docker cp "sql1:/var/opt/mssql/data/demodb_LogBackup.bak" "C:\temp\DATABASESQLSERVER1.bak"
- sudo docker cp "C:\temp\DATABASESQLSERVER1.bak" "sql2:/var/opt/mssql/data/demodb_LogBackup.bak"
- sudo docker exec -it sql2 /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '<YourNewStrong!Passw0rd>' -Q 'RESTORE DATABASE [yourdbname] FROM DISK = "/var/opt/mssql/data/demodb_LogBackup.bak"'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement