I am trying to restore database to Docker SQL Server. The backup was created on windows machine.
I was trying with Azure Data Studio and I am getting this error:
Restore Database: Microsoft.Data.SqlClient.SqlError: BACKUP LOG cannot be performed because there is no current database backup.
In Azure Data Studio runs this SQL when using built in wizard:
USE [master] BACKUP LOG [XXX] TO DISK = N'/var/opt/mssql/data/XXX_LogBackup_2020-07-21_20-30-59.bak' WITH NOFORMAT, NOINIT, NAME = N'XXX_LogBackup_2020-07-21_20-30-59', NOSKIP, NOREWIND, NOUNLOAD, NORECOVERY , STATS = 5 RESTORE DATABASE [XXX] FROM DISK = N'/BCP_YYY2020-07-07.bak' WITH FILE = 1, MOVE N'YYY' TO N'/var/opt/mssql/data/XXX.mdf', MOVE N'YYY_log' TO N'/var/opt/mssql/data/XXX_log.ldf', NOUNLOAD, STATS = 5
I was also trying with DataGripr with SQL Server Backup/Restore plugin but It failed to.
Error message:The operating system returned the error '267(The directory name is invalid.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on '/var/opt/mssql/data/XXXXXX_log.ldf\XXXXXX.mdf'.
My linux config:
- Manjaro 20.0.0.3
- File system: BTRFS
I have no clue what I am doing wrong. Last time I had SQL Server on docker on Windows and I was able to restore database from file.