From 93e27f6db6dd1d0cddd62af4401a03a744f02e0d Mon Sep 17 00:00:00 2001 From: Dennis Neufeld Date: Sun, 16 Jul 2017 10:17:22 +0200 Subject: [PATCH] Backup/Restore maildir: Update commands Use debian:stretch-slim instead of debian:jessie mailcow.conf and $DATE not needed --- docs/u_e-backup_restore-maildir.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/u_e-backup_restore-maildir.md b/docs/u_e-backup_restore-maildir.md index ed0572b05..51669cb30 100644 --- a/docs/u_e-backup_restore-maildir.md +++ b/docs/u_e-backup_restore-maildir.md @@ -3,9 +3,7 @@ This line backups the vmail directory to a file backup_vmail.tar.gz in the mailcow root directory: ``` cd /path/to/mailcow-dockerized -source mailcow.conf -DATE=$(date +"%Y%m%d_%H%M%S") -docker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker-compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:jessie tar cvfz /backup/backup_vmail.tar.gz /vmail +docker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker-compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar cvfz /backup/backup_vmail.tar.gz /vmail ``` You can change the path by adjusting ${PWD} (which equals to the current directory) to any path you have write-access to. @@ -14,7 +12,5 @@ Set the filename `backup_vmail.tar.gz` to any custom name, but leave the path as ### Restore ``` cd /path/to/mailcow-dockerized -source mailcow.conf -DATE=$(date +"%Y%m%d_%H%M%S") -docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker-compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:jessie tar xvfz /backup/backup_vmail.tar.gz +docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker-compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar xvfz /backup/backup_vmail.tar.gz ```