# New WorkflowGen data management with Docker volumes

**URL:** <https://discuss.workflowgen.com/t/new-workflowgen-data-management-with-docker-volumes/1641>\
**Category:** Docker\
**Tags:** docker\
**Created:** [June 15, 2020, 4:50pm UTC](https://discuss.workflowgen.com/t/new-workflowgen-data-management-with-docker-volumes/1641 "2020-06-15T16:50:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![clevesque](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/clevesque/32/316_2.png) [@clevesque](https://discuss.workflowgen.com/u/clevesque)\
**Post date:** [June 15, 2020, 4:50pm UTC](https://discuss.workflowgen.com/t/new-workflowgen-data-management-with-docker-volumes/1641/1 "2020-06-15T16:50:03Z")

</div>

Hi all!

As you may have noticed recently, the WorkflowGen Docker images have changed in their data management behavior. In fact, before this change, you would use three volumes to persist data:

- `appdata` bound to `C:\wfgen\appdata`
- `wfapps` bound to `C:\wfgen\wfapps`
- `licenses` bound to `C:\wfgen\licenses`

For example, in command line, you would do something like this:

```auto
# Create the volumes
"appdata", "wfapps", "licenses" | ForEach-Object { docker volume create $_ }

# Copy your license to the "licenses" volume
Copy-Item C:\Path\To\WFG.lic (docker volume inspect -f "{{ .Mountpoint }}" licenses)

# Run the WorkflowGen container
docker container run `
    # ...
    --mount "type=volume,src=appdata,dst=C:\wfgen\appdata" `
    --mount "type=volume,src=wfapps,dst=C:\wfgen\wfapps" `
    --mount "type=volume,src=licenses,dst=C:\wfgen\licenses,readonly" `
    # ...
    --name wfgen `
    advantys/workflowgen:7.18.2-win-ltsc2019

```

Now, the `appdata` and `wfapps` volumes have been merged together. The license handling part stays the same. The reason is that when using the container in a production environment such as Kubernetes on a cloud provider, you would find yourself having two separate storage devices (disk or file share) for storing WorkflowGen data. This is not economical nor efficient. Therefore, we decided to merge them into a single volume called `wfgdata`. Now, when running a WorkflowGen container, you would do something like this:

```auto
# Create the volumes
"wfdata", "licenses" | ForEach-Object { docker volume create $_ }

# Copy your license to the "licenses" volume
Copy-Item C:\Path\To\WFG.lic (docker volume inspect -f "{{ .Mountpoint }}" licenses)

# Run the WorkflowGen container
docker container run `
    # ...
    --mount "type=volume,src=wfdata,dst=C:\wfgen\data" `
    --mount "type=volume,src=licenses,dst=C:\wfgen\licenses,readonly" `
    # ...
    --name wfgen `
    advantys/workflowgen:7.18.2-win-ltsc2019

```

To migrate an existing WorkflowGen installation, you can do the following:

**Step 1: Create a new volume with data directories**

```auto
docker volume create wfgdata

$mountPath = docker volume inspect -f "{{ .Mountpoint }}" wfgdata

New-Item (Join-Path $mountPath "appdata") -ItemType Directory
New-Item (Join-Path $mountPath "wfapps") -ItemType Directory

```

**Step 2: Transfer files from old volumes to new one**

```auto
$mountPath = docker volume inspect -f "{{ .Mountpoint }}" wfgdata

docker volume inspect -f "{{ .Mountpoint }}" appdata `
    | Get-ChildItem `
    | Copy-Item -Destination (Join-Path $mountPath "appdata") -Recurse -Force
docker volume inspect -f "{{ .Mountpoint }}" wfapps `
    | Get-ChildItem `
    | Copy-Item -Destination (Join-Path $mountPath "wfapps") -Recurse -Force

```

**Step 3: Pull the newest WorkflowGen image and recreate the container**

```auto
docker image pull advantys/workflowgen:7.18.2-win-ltsc2019

docker container rm -f wfgen
# Run the WorkflowGen container
docker container run `
    # ...
    --mount "type=volume,src=wfdata,dst=C:\wfgen\data" `
    --mount "type=volume,src=licenses,dst=C:\wfgen\licenses,readonly" `
    # ...
    --name wfgen `
    advantys/workflowgen:7.18.2-win-ltsc2019

```

**Step 4: Safely delete old volumes**

```auto
"wfapps", "appdata" | ForEach-Object { docker volume rm $_ }

```

That’s it!
