microsoft / mssql-docker

Official Microsoft repository for SQL Server in Docker resources
MIT License
1.74k stars 759 forks source link

BackupIoRequest::ReportIoError: read failure on backup device #305

Open zhex900 opened 6 years ago

zhex900 commented 6 years ago

Hi,

I am running microsoft/mssql-server-linux:2017-latest in macOS docker-machine. When use sqlcmd to restore a backup (187M) , get their error:

Msg 3203, Level 16, State 1, Server aeef66aae1e7, Line 1
Read on "/app/backup/DBTEST.bak" failed: 31(A device attached to the system is not functioning.)
Msg 3013, Level 16, State 1, Server aeef66aae1e7, Line 1
RESTORE DATABASE is terminating abnormally.
Internal I/O request 0x00000005B7E79CD0: Op: Read, pBuffer: 0x000000049A3B0000, Size: 4096, Position: 0, SOS: Internal: 0xC0000001, InternalHigh: 0x0, Offset: 0x0, OffsetHigh: 0x0, m_buf: 0x000000049A3B0000, m_len: 4096, m_actualBytes: 0, m_errcode: 31, BackupFile: /app/backup/DBTEST.bak
2018-05-10 03:21:04.58 spid51      Using 'dbghelp.dll' version '4.0.5'
2018-05-10 03:49:31.48 Backup      Error: 18210, Severity: 16, State: 1.
2018-05-10 03:49:31.48 Backup      BackupIoRequest::ReportIoError: read failure on backup device '/app/backup/DBTEST.bak'. Operating system error 31(A device attached to the system is not functioning.).
docker info
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
SudheendraSingh commented 6 years ago

Is a fix identified for this? I am facing a similar issue while sql server is being shutdown - docker image microsoft/mssql-server-linux

twright-msft commented 6 years ago

Are you using a -v volume mount to the host?

SudheendraSingh commented 6 years ago

HI Travis, Yes I have used volume to mount to the host.

Cheers, Sudhi

On Fri, 22 Jun 2018 at 16:44, Travis Wright notifications@github.com wrote:

Are you using a -v volume mount to the host?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Microsoft/mssql-docker/issues/305#issuecomment-399486621, or mute the thread https://github.com/notifications/unsubscribe-auth/AH5RTVKClk01B4rHGBfLjY5m-2XklOK9ks5t_RDugaJpZM4T5Uup .

-- Regards, Sudheendra.N.Singh 07872067281

twright-msft commented 6 years ago

Right. -v Volume mounts on macOS are not supported yet. Please see issue #12 for more details and workarounds.

biel-correa commented 1 year ago

You don't need to use a volume, I send the backup files to the container using docker cp but still got the same error.

Windows here