D2 cluster up --seed (failure on windows)

Hi all,

Attempting to seed a dev database on windows using the seed command.

Initially I was getting a “‘.’ is not recognized as an internal or external command” message which after some digging led me to this post.

Following those instructions I now get the issue that windows simply opens the seed.sh file and doesn’t actually execute the script. I appreciate that this is a bash script and there are all kinds of reasons why it shouldn’t work. Are there any other devs out there using windows, and if so what have your workarounds been for this seeding issue?

For now I am able to run a dev instance on a separate linux machine, but it would be great to get this working on my windows device.


I somewhat janky workaround for now, but I do now at least have dhis2 running in docker with the demo database.

Used the instructions below to copy the backup dump (located in C:\Users\User Folder\.cache\d2\cache) into the postgres container and gunzipped it.

I then restored the database in the usual fashion using:
psql -U dhis -d dhis2 -f <path to dump>

1 Like

You could use WSL instead (but for experimental reasons - not recommended for production)

See if this post helps:

1 Like

Thanks Gassim, I’ll give that a go.

It’s a shame you couldn’t make it to the conference. I was stoked to meet you. Hopefully next year!

1 Like