I am using the mcr.microsoft.com/mssql/server:2019-latest container and want to mount its data directory so that data does not get lost if the server goes down.
Where inside is the data directory located? The documentation does not mention this at all.
The files, for SQL Server on Linux, are by default located in /var/opt/mssql. Unsurprising the Data files are in the data directory, and the log files in the log directory.
This is also in the documentation Change the default data or log directory location:
The filelocation.defaultdatadir and filelocation.defaultlogdir settings change the location where the new database and log files are created. By default, this location is /var/opt/mssql/data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With