This guide assumes you intend to migrate an existing mailcow server (source) over to a brand new, empty server (target). It takes no care about preserving any existing data on your target server and will erase anything within `/var/lib/docker/volumes` and thus any Docker volumes you may have already set up.
!!! tip
Alternatively, you can use the `./helper-scripts/backup_and_restore.sh` script to create a full backup on the source machine, then install mailcow on the target machine as usual, copy over your `mailcow.conf` and use the same script to restore your backup to the target machine.
**3\.** Run the following commands on the source machine (take care of adding the trailing slashes in the first path parameter as shown below!)
!!! danger
This command (the second one) deletes everything that is already under `/var/lib/docker/volumes` on the target server. So make sure that nothing important is left on the target server before running the following commands!
**9\.** Finally, change your DNS settings to point to the target server. Also check the `SNAT_TO_SOURCE` variable in your `mailcow.conf` file if you have changed your public IP address, otherwise SOGo may not work.