Cannot restore mssql file

I have used SQLBackupAndFTP to create a backup of a database. Worked fine, I ended up with a Zip file having an SQL file in it.

All good so far. But when trying to restore to a local database, selecting remote since the file is a sql and not a BAK file, I get:

26/07/2022 15.19.38	[Error]	Failed to restore "LomaxWeb_shared" database. T-SQL command error: /*    ==Scripting Parameters==

    Source Server Version : SQL Server 2016 (13.0.7016)
    Source Database Engine Edition : Microsoft SQL Server Standard Edition
    Source Database Engine Type : Standalone SQL Server

    Target Server Version : SQL Server v160
    Target Database Engine Edition : Unknown
    Target Database Engine Type : Standalone SQL Server
*/

/****** Object:  Database [LomaxWeb_shared]    Script Date: 26/07/2022 14.47.06 ******/
CREATE DATABASE [Lom...red.mdf' , SIZE = 5527552KB , MAXSIZE = UNLIMITED, FILEGROWTH = 102400KB )
 LOG ON 
( NAME = N'LomaxWeb_shared_log', FILENAME = N'D:\MSSQL\Data\LomaxWeb_shared.ldf' , SIZE = 5634048KB , MAXSIZE = 2048GB , FILEGROWTH = 512000KB )
 COLLATE Danish_Norwegian_CI_AS
 > Directory lookup for the file "D:\MSSQL\Data\LomaxWeb_shared.mdf" failed with the operating system error 3(The system cannot find the path specified.).
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

Same problem when trying to restore to a truly remote database server.
The connection has been tested though.

Thanks in advance

Hello Jarl_Gjessing,

You get the following error message:

“Directory lookup for the file “D:\MSSQL\Data\LomaxWeb_shared.mdf” failed with the operating system error 3(The system cannot find the path specified.).”

There is no such folder that is used during the restore.

To resolve the issue please create that folder, or open the script and change the folder to another that exists.

Also, you can find more details about that issue at
http://community.sqlbackupandftp.com/t/operating-system-error-3-the-system-cannot-find-the-path-specified
https://blog.sqlbackupandftp.com/how-to-solve-operating-system-error-3

If you have any other questions, please let us know.

Thank you.