Link to home
Start Free TrialLog in
Avatar of janhoedt
janhoedt

asked on

Sql server on Docker: backup?

Hi, 


I got Microsoft Sql 2017 running in a Docker container on a Synology nas and that works fine. Though I wonder what the best option for backup is. 

Should I backup the db (then how since I cannot run any jobs) or can I also backup the Docker as a whole and f.e. run it on a Windows Docker? 

Note: what about licenses for this sql, I have added it as developer but what if qi want to use it as production, can I do that, is it meant for that? 


Please advise, 

J

Avatar of ste5an
ste5an
Flag of Germany image

A database backup is a different thing then a machine or image backup of your container.

In a production system you must use the SQL Server backup mechanisms to backup the datbases properly.
then how since I cannot run any jobs
Why?

You can do an image backup.
But this raises a question: Where are the database files located?
They should not be in the container image. They belong instead to differnt volumes (disks).

You can upgrade to a different edition by runnign the setup tool.
1) Should I backup the db (then how since I cannot run any jobs) or can I also backup the Docker as a whole and f.e. run it on a Windows Docker?

Since Docker has no concept of persistent storage, you'll have setup a data volume... else you're going to loose all you're data each time your containers stops/restarts...

So... you can...

a) Use the normal MSSQL backup tool as usual.

b) Or stop the container, then backup the raw database files.

There are pros + cons of each approach.

2) what about licenses for this sql, I have added it as developer but what if qi want to use it as production, can I do that, is it meant for that?

Unsure what this means.

MSSQL licenses are the same inside or outside Docker.

Rephrase your question, if you require an answer to this.
Avatar of janhoedt
janhoedt

ASKER

Mssql backup jobs don't exist in the sql container. You also cannot upgrade a container via setup.exe, it's Linux not Windows.
ASKER CERTIFIED SOLUTION
Avatar of ste5an
ste5an
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial