Skip to content
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

LDF files are not moved to MSSQL_LOG_DIR #874

Open
pm7y opened this issue Mar 21, 2024 · 0 comments
Open

LDF files are not moved to MSSQL_LOG_DIR #874

pm7y opened this issue Mar 21, 2024 · 0 comments

Comments

@pm7y
Copy link

pm7y commented Mar 21, 2024

I am overriding the data and log folders using MSSQL_DATA_DIR and MSSQL_LOG_DIR but the *.ldf files are still created in the data dir. The only thing in MSSQL_LOG_DIR are error log files.

According to this link MSSQL_LOG_DIR should move the *.ldf files and MSSQL_ERROR_LOG_FILE should move the log files.

image

Expectation

The *.ldf files are located in the folder specified in MSSQL_LOG_DIR.

version: "3"

name: scratch-dbs

services:
  mssql:
    image: mcr.microsoft.com/mssql/server:2022-CU12-ubuntu-22.04
    user: root
    restart: no
    hostname: scratch-mssql
    environment:
      - ACCEPT_EULA=Y
      - MSSQL_SA_PASSWORD=Scr4tch!
      - MSSQL_PID=Developer
      - MSSQL_BACKUP_DIR=/var/opt/mssql/backups
      - MSSQL_DATA_DIR=/var/opt/mssql/data
      - MSSQL_LOG_DIR=/var/opt/mssql/log

    ports:
      - 14330:1433
    volumes:
      - ./data/mssql/backups:/var/opt/mssql/backups
      - ./data/mssql/data:/var/opt/mssql/data
      - ./data/mssql/log:/var/opt/mssql/log

volumes:
  mssql:

networks:
  default:
    name: scratch-dbs-net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant