SQL Server on Linux: what works and what does not
An honest status of backing up SQL Server on Linux with SQL DATA LOG Backup: the agent runs on Windows, a shared staging folder is required, and setup does not guide you through it yet.
Short answer: the agent runs on Windows only, and SQL Server on Linux is not a supported setup in the desktop app yet. The backup engine does contain what is needed for a careful, manual configuration. Here is exactly what we know.
Why it is not a given
BACKUP DATABASE runs inside SQL Server and writes to a path on the SQL Server host. For SQL Server on Linux that is a Linux path such as /var/opt/mssql/backups. The SQL DATA LOG service is on Windows and has to read the file afterwards to compress, encrypt and send it. So both sides must see the same folder: a Windows share (or NFS/Samba export) that SQL Server on Linux has mounted.
What the code does
- The agent asks the server for its host platform (Linux or Windows) when it connects.
- The staging setting has two values: the folder as the agent sees it (
staging.path) and, when it differs, the folder as SQL Server sees it (staging.sqlServerPath). A Linux path with forward slashes stays a Linux path. - Our automated integration tests run against SQL Server images on Linux containers (2019 and 2022, Developer and Express) with a folder shared between the test and the container.
What is missing
- The setup wizard does not guide a Linux server. It treats a remote Windows server specially (it asks for a shared folder) but not a Linux one, and the desktop app does not offer the
staging.sqlServerPathfield. You must editconfig.jsonyourself. - We have not run it against production Linux servers with a real network mount. Treat it as experimental.
- There is no agent for Linux.
If you want to try
- Export a folder (Samba/SMB) that both machines can use, and mount it on the Linux server, for example at
/mnt/sdl-staging. Themssqluser must be able to write there. - On the Windows computer that runs the service, give
NT SERVICE\SQLDataLog(shown on the network as the computer account) Modify rights on the share. - In the
backupsection ofconfig.jsonsetstaging.pathto the share as Windows sees it (\\server\share\sdl-staging) andstaging.sqlServerPathto/mnt/sdl-staging. - Run a backup and read the result in History. Then do a restore check.
Other options
- Keep SQL Server on Windows where you can; that is the supported path.
- Use your own Linux backup routine for now and keep SQL DATA LOG for your Windows servers.