Sup guys, I just wanted to migrate from my old server to a new one using the “backup_and_restores.sh” script.
I git cloned the mailcow repository and run generate_config.sh
on the new host, after that I started the compose file with docker compose up -d
.
After running ./helper-scripts/backup_and_restore.sh restore
and select 0 for all
I receive this:
Using 1 Thread(s) for this run.
Notice: You can set the Thread count with the THREADS Variable before you run this script.
Using /home/promises/docker/backup as backup/restore location.
Found project name mailcowdockerized
[ 1 ] - /home/promises/docker/backup/mailcow-2023-03-03-03-41-24/
Select a restore point: 1
[ 0 ] - all
[ 1 ] - Postfix data
[ 2 ] - Redis DB
[ 3 ] - Mail directory (/var/vmail)
[ 4 ] - Rspamd data
[ 5 ] - SQL DB
[ 6 ] - Crypt data
Select a dataset to restore: 0
Restoring postfix
redis
vmail
rspamd
mariadb
crypt from /home/promises/docker/backup/mailcow-2023-03-03-03-41-24/...
Stopping watchdog-mailcow...
0fec6bae70f8
0e8a5a801de1
docker: Error response from daemon: Conflict. The container name "/mailcow-backup" is already in use by container "48bec842911c3f88976e04717b3087551d4c8fad426dc163e8ac5fcce1a02432". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
0e8a5a801de1
90c7f773c7b2
docker: Error response from daemon: Conflict. The container name "/mailcow-backup" is already in use by container "48bec842911c3f88976e04717b3087551d4c8fad426dc163e8ac5fcce1a02432". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
90c7f773c7b2
3a4edcc2db9d
docker: Error response from daemon: Conflict. The container name "/mailcow-backup" is already in use by container "48bec842911c3f88976e04717b3087551d4c8fad426dc163e8ac5fcce1a02432". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
3a4edcc2db9d
In most cases it is not required to run a full resync, you can run the command printed below at any time after testing wether the restore process broke a mailbox:
docker exec 3a4edcc2db9d doveadm force-resync -A '*'
Force a resync now? [y|N] y
Error: auth-master: userdb list: connect(/run/dovecot/auth-userdb) failed: No such file or directory
Panic: file auth-master.c: line 436 (auth_master_unset_io): assertion failed: (conn->to == NULL)
Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(backtrace_append+0x42) [0x7f359c5b3872] -> /usr/lib/dovecot/libdovecot.so.0(backtrace_get+0x1e) [0x7f359c5b398e] -> /usr/lib/dovecot/libdovecot.so.0(+0x1025eb) [0x7f359c5c05eb] -> /usr/lib/dovecot/libdovecot.so.0(+0x102621) [0x7f359c5c0621] -> /usr/lib/dovecot/libdovecot.so.0(+0x55589) [0x7f359c513589] -> /usr/lib/dovecot/libdovecot.so.0(+0x528b4) [0x7f359c5108b4] -> /usr/lib/dovecot/libdovecot.so.0(auth_master_user_list_deinit+0x13f) [0x7f359c5aa4af] -> /usr/lib/dovecot/libdovecot-storage.so.0(mail_storage_service_all_next+0x4b) [0x7f359c6fa86b] -> /usr/bin/doveadm(doveadm_cmd_ver2_to_mail_cmd_wrapper+0x734) [0x56122e24cfc4] -> /usr/bin/doveadm(doveadm_cmd_run_ver2+0x501) [0x56122e25d211] -> /usr/bin/doveadm(doveadm_cmd_try_run_ver2+0x3a) [0x56122e25d28a] -> /usr/bin/doveadm(main+0x1d4) [0x56122e23be64] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f359c16ed0a] -> /usr/bin/doveadm(_start+0x2a) [0x56122e23c0ca]
9f36f6a10f77
docker: Error response from daemon: Conflict. The container name "/mailcow-backup" is already in use by container "48bec842911c3f88976e04717b3087551d4c8fad426dc163e8ac5fcce1a02432". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
9f36f6a10f77
mailcow will be stopped and the currently active mailcow.conf will be modified to use the DB parameters found in /home/promises/docker/backup/mailcow-2023-03-03-03-41-24//mailcow.conf - do you want to proceed? [Y|n] y
Stopping mailcow...
There is no such container “48bec842911c3f88976e04717b3087551d4c8fad426dc163e8ac5fcce1a02432” running on my system though…
Error response from daemon: No such container: 48bec842911c3f88976e04717b3087551d4c8fad426dc163e8ac5fcce1a02432
Docker info:
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.2
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.16.0
Path: /usr/libexec/docker/cli-plugins/docker-compose
scan: Docker Scan (Docker Inc.)
Version: v0.23.0
Path: /usr/libexec/docker/cli-plugins/docker-scan
Server:
Containers: 19
Running: 19
Paused: 0
Stopped: 0
Images: 21
Server Version: 23.0.1
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: 2456e983eb9e37e47538f59ea18f2043c9a73640
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.10.0-21-amd64
Operating System: Debian GNU/Linux 11 (bullseye)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 62.59GiB
Name: promises
ID: 7b0ffa00-d6ac-40b3-8483-3466f1579c51
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Also the container ID doesn’t change at all it’s always
48bec842911c3f88976e04717b3087551d4c8fad426dc163e8ac5fcce1a02432