{"id":708,"date":"2020-04-15T09:05:52","date_gmt":"2020-04-15T09:05:52","guid":{"rendered":"http:\/\/bruceng.com\/dev\/?p=708"},"modified":"2020-04-15T09:05:52","modified_gmt":"2020-04-15T09:05:52","slug":"cannot-restore-database-to-sql-server-running-in-docker-container","status":"publish","type":"post","link":"https:\/\/bruceng.com\/dev\/?p=708","title":{"rendered":"Cannot restore database to SQL Server running in Docker container"},"content":{"rendered":"\n<p>I faced this issue, turned out when using docker cp to copy files to the container, the files were owned by root user and other users didn&#8217;t have read permission. This is because the files were copied from shared folder in Windows host to the linux VM.<\/p>\n\n\n\n<p>Because only root can read, I couldn&#8217;t restore the DB using the copied file as the server cannot read the file.<\/p>\n\n\n\n<p>Doing a chmod to add read permission before copying into the container solves the issue.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I faced this issue, turned out when using docker cp to copy files to the container, the files were owned by root user and other users didn&#8217;t have read permission. This is because the files were copied from shared folder in Windows host to the linux VM. Because only root can read, I couldn&#8217;t restore &hellip; <a href=\"https:\/\/bruceng.com\/dev\/?p=708\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Cannot restore database to SQL Server running in Docker container&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[97,73,10],"class_list":["post-708","post","type-post","status-publish","format-standard","hentry","category-problems","tag-docker","tag-linux","tag-sql-server"],"_links":{"self":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=708"}],"version-history":[{"count":1,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/708\/revisions"}],"predecessor-version":[{"id":709,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=\/wp\/v2\/posts\/708\/revisions\/709"}],"wp:attachment":[{"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bruceng.com\/dev\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}