Skip to content

DocumentDb-local data is not persistent across sessions. Data Loss #226

Closed
@JeetMajumdar2003

Description

@JeetMajumdar2003

The data persistence issue. I tried a local volume, yet the problem remains, like when I stop and restart the container, the data is lost.

I run this cmd: docker run -dt -p 10260:10260 -e USERNAME=Username -e PASSWORD=YourPassword -v documentdb-data:/data ghcr.io/microsoft/documentdb/documentdb-local:latest

source: DocumentDB Local – MongoDB API on Your Machine

  1. Successfully run the image-
    Image

  2. Dbs created-
    Image

  3. Local Volume-
    Image

  4. Stoped-
    Image

  5. Start-
    Image

  6. Data Lost-
    Image

  7. Volume not connected-
    Image

Activity

xgerman

xgerman commented on Jun 17, 2025

@xgerman
Contributor

Should be fixed by #209 - need to verify and then push a new version

guanzhousongmicrosoft

guanzhousongmicrosoft commented on Jun 17, 2025

@guanzhousongmicrosoft
Contributor

Sorry for the inconvenience.
The issue is due to missing data path in the docker command, please use command below and try again:

docker run -dt -p 10260:10260 -e USERNAME=Username -e PASSWORD=YourPassword -e DATA_PATH=/data -v documentdb-data:/data ghcr.io/microsoft/documentdb/documentdb-local:latest

I have proposed a new feature backlog here to adjust default data path to /data since this is more common

guanzhousongmicrosoft

guanzhousongmicrosoft commented on Jun 17, 2025

@guanzhousongmicrosoft
Contributor

TODO: Change default data path to /data

JeetMajumdar2003

JeetMajumdar2003 commented on Jun 18, 2025

@JeetMajumdar2003
Author

Thank you, it is now functioning correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingdocumentdb-localfor documentdb-local related issuesgatewayfor gateway related issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @xgerman@guanzhousongmicrosoft@JeetMajumdar2003

    Issue actions

      DocumentDb-local data is not persistent across sessions. Data Loss · Issue #226 · microsoft/documentdb