8

I am running SQL Server in docker on a mac. I have taken a SQL Server backup from windows and restored it in the mac SQL Server docker instance. Now I want to take a backup from the SQL Server docker instance and restore it back to windows. When I attempt to restore on Windows I am getting a "System tables sysfiles1 is corrupted". Is it possible to take a back up from SQL Server Linux and restore it on SQL Server Windows?

  • Could this be a file copy issue...like ASCII vs. BINARY? – Randy in Marin May 28 at 15:27
11

I just validated it. Yes. Not only is it possible, other than using the WITH MOVE to change where the files are located, there's literally nothing special involved. I tested it using a shared volume to get the backup out of my docker instance. I also tested it using the docker file copy command. Both worked just fine. It's possible that the backup is corrupt or that the versions are off.

| improve this answer | |
  • Not working for me though Grant. I am creating the backup in the container, copying out to the mac os, then copying over to windows. tried a couple of times. always "System table sysfiles1 is corrupted" – mikelus May 21 at 12:32
  • 1
    @mikelus That doesn’t mean the problem is going between Linux and Windows. It sounds like you have corruption no matter where you try to restore. – Aaron Bertrand May 21 at 13:24
  • @AaronBertrand I was able to get it to restore on another docker SQL Server instance so it's working in Linux, just not on windows. so it's not actually corrupted – mikelus May 21 at 16:44
  • 2
    Same version and build number? – Tibor Karaszi May 21 at 16:48
  • 6
    @mikelus Well, SQL Server doesn't make up errors about corruption for funsies... and I still don't believe the operating system has anything to do with this at all. Can you provide more details, like version/build backup was taken, version/build you're restoring to, the restore command you're actually running, the whole error message including error numbers, what type of filegroups (e.g. filestream / in-mem) and how many files the database has? Does this happen for just this database or all database? Could you post the .bak file somewhere (or any .bak file that repros)? – Aaron Bertrand May 21 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.