Using either MacOS or Linux, my objective is to copy a database from one MSSQL database server to another. The source database server is remote, while the target database server (which will be restored from the source) is running on port 1433 on a local docker container.
Unlike for postgres (pg_dump
utility is well-documented), I have not found much documentation online about how to practically use command line tools like sqlcmd (which are avaiable after brew install mssql-tools
), to connect to, copy and restore a database on SQL server. Are there any suggestions for a basic template of commands to use for copying databases and restoring them using the terminal in MacOS/Linux?