Skip to content

Restore database from backup in Docker #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
utterances-bot opened this issue Nov 17, 2022 · 3 comments
Open

Restore database from backup in Docker #25

utterances-bot opened this issue Nov 17, 2022 · 3 comments
Labels

Comments

@utterances-bot
Copy link

Restore database from backup in Docker | Chad’s Blog

Spent about an hour trying to restore a database to SQL Server in Docker. Decided to convert my notes to a blog post, hopefully this will help someone else out there who also didn’t read the 20 other blog posts about it :)

https://chadbaldwin.net/2021/11/04/restore-database-in-docker.html

Copy link

Thank you for this. Your simple solution helped a lot.

Copy link

revgeo commented Mar 25, 2025

Fantastic. Very easy to follow and worked perfectly.

@chadbaldwin
Copy link
Owner

@revgeo nice! Glad it worked for you. Though, FYI, I believe since writing this post, either Docker, WSL or Windows updated something to make it MUCH easier to do this so you don't have to copy the backup into the container in order to restore every single time. For whatever reason, at the time I wrote this, I could not for the life of me get a windows directory to mount as a volume to a Linux container running on WSL2.

But you can now! You can actually access it directly from the container into a virtually mapped directory (volume). No copying.

I haven't had time to update the post, I also totally forgot about this, but maybe I'll get around to that soon.

I would suggest looking into setting up a mapped volume instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants