I am trying to offload MSSQL backup to another server.
So, I am connecting from server B to server A using MSSQL credentials.
On server B I have:
working drive
destination drive
I have set both in app. The connection to DB is tested OK. However, when I try to run the task, I get this:
[Error] Failed to backup "PraznaBaza" database with "Full" backup type: One or more errors occurred. > Cannot open backup device 'D:\SQLBAFTP_TEMP\Pranas.NET\SBF\b5457b2a-5bce-4771-b2df-fb3c55c482af\backup\PraznaBaza202607240620.bak'. Operating system error 3(The system cannot find the path specified.).
BACKUP DATABASE is terminating abnormally.
Which is not fully clear to me, as the SQLBAFT creates folder structure inside the working dir, which should mean it has rights there.
Permissions for newly created folders are inherited from the parent directory where they are created.
Please make sure that the SQL Server service account has access to the temporary directory specified in the SQLBackupAndFTP settings, including its subfolders.
Hello, thank you for reply. The service should have access, as it is run under system if I am not mistaken, and the dir has both user and system privileges. It even created temp folders, but I couldn’t run it.
The key point is that the BACKUP DATABASE command is executed by SQL Server on Server A, not by SQLBackupAndFTP running on Server B.
For a remote SQL Server, the temporary backup location must be accessible to the SQL Server service itself. If you want the backup to be written directly to Server B, use a shared network folder (UNC path), for example:
\\ServerB\Backups\Temp
and make sure the account running the SQL Server service on Server A has read/write permissions to that share.
You can check which account the SQL Server service is running under in the SQL Server (MSSQLSERVER) service properties, on the Log On tab. In most cases, it is the built-in account NT Service\MSSQLSERVER (or a similar service account for named instances).
Please ensure that this account has the necessary permissions to access the temporary backup folder or the network share. This is the account that SQL Server uses when executing the BACKUP DATABASE command.