How to restore a SQL Server Database on Ubuntu
Jul 30, 2017 · 1 min read

Quick tip. This is the gist in case you need to restore a SQL Server Database in the terminal. Suppose we have the backup file users_erp_bc.bak on our linux sqlserver machine.
First we’re going to place the backup file in a subdirectory of /var/opt/mssql.
We need the logical names inside our backup file, lets enter sqlcmd:
$ sqlcmd -S localhost -U SAThen run:
Great! Now we know the logical names:
- UsersDB_ERP_QL
- UsersDB_ERP_Log
lets restore the database:
Thats it. If you have any sugestions on how this guide can be improved, please leave a comment below.
more information on: https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-migrate-restore-database
https://stackoverflow.com/questions/6267273/how-to-restore-to-a-different-database-in-sql-server
