mailcow-dockerized-docs/docs/u_e-dovecot-vmail-volume.md

40 Zeilen
1,5 KiB
Markdown

2020-10-04 19:41:07 +02:00
If you want to use another folder for the vmail-volume, you can create a `docker-compose.override.yml` file and add the following content:
```
2018-06-05 20:41:27 +02:00
version: '2.1'
2020-10-24 21:52:34 +02:00
volumes:
vmail-vol-1:
driver_opts:
type: none
device: /data/mailcow/vmail
o: bind
```
2019-06-20 13:05:33 +02:00
### Moving an existing vmail folder:
2019-06-20 13:05:09 +02:00
- Locate the current vmail folder by its "Mountpoint" attribute: `docker volume inspect mailcowdockerized_vmail-vol-1`
``` hl_lines="10"
[
{
"CreatedAt": "2019-06-16T22:08:34+02:00",
"Driver": "local",
"Labels": {
"com.docker.compose.project": "mailcowdockerized",
"com.docker.compose.version": "1.23.2",
"com.docker.compose.volume": "vmail-vol-1"
},
"Mountpoint": "/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data",
"Name": "mailcowdockerized_vmail-vol-1",
"Options": null,
"Scope": "local"
}
]
```
- Copy the content of the `Mountpoint` folder to the new location (e.g. `/data/mailcow/vmail`) using `cp -a`, `rsync -a` or a similar non strcuture breaking copy command
- Stop mailcow by executing `docker-compose down` from within your mailcow root folder (e.g. `/opt/mailcow-dockerized`)
- Create the file `docker-compose.override.yml`, edit the device path accordingly
2018-12-06 22:40:18 +01:00
- Delete the current vmail folder: `docker volume rm mailcowdockerized_vmail-vol-1`
2019-06-20 13:05:09 +02:00
- Start mailcow by executing `docker-compose up -d` from within your mailcow root folder (e.g. `/opt/mailcow-dockerized`)