How to take a remote SQL server database backup to local machine?
try to use an unc path in this way:
sqlcmd -S xxx.xxx.xxx.xxx -U &lt;username&gt; -P &lt;password&gt; -Q &quot;BACKUP DATABASE [TestUser] TO DISK='\\server\shared_folder\TestUser.bak';&quot;

You have to give SQL Server Service User the right to write to the remote path
\\server\shared_folder\
To do this you have to configure a local samba share connected to the source domain (as a domain member)