Migrating the application to a new server
This guide is for a Standalone installation: it moves the PostgreSQL, Valkey and MinIO volumes and the deploy/docker-compose directory. In an HA installation, the data is stored in external services, so only the deploy/docker-compose directory is moved.
1. Stopping the application on the old server
Note
The application must be stopped while the data is being copied.
cd deploy/docker-compose
docker compose down2. Archiving the volumes
Docker Compose names volumes using the <compose directory>_<volume name> pattern, for example docker-compose_flip_postgres. To list the volumes:
docker volume ls | grep flip_Create the archives (take the volume names from the docker volume ls output):
docker run --rm -v docker-compose_flip_postgres:/data -v $(pwd):/backup alpine tar czf /backup/pg_data.tar.gz -C /data .
docker run --rm -v docker-compose_flip_valkey:/data -v $(pwd):/backup alpine tar czf /backup/valkey_data.tar.gz -C /data .
docker run --rm -v docker-compose_flip_minio:/data -v $(pwd):/backup alpine tar czf /backup/minio_data.tar.gz -C /data .3. Transferring to the new server
Copy the entire deploy/docker-compose directory (configuration files, .env, certificates) and the three archives to the new server:
scp -r deploy user@new-server:/opt/flip/
scp pg_data.tar.gz valkey_data.tar.gz minio_data.tar.gz user@new-server:/opt/flip/deploy/docker-compose/4. Restoring the volumes on the new server
Install Docker, log in to the registry and pull the images (step 5 of the Standalone installation). Create the containers without starting them — this creates the volumes named after the compose project:
cd /opt/flip/deploy/docker-compose
docker compose create flip-postgres flip-valkey flip-minio
docker volume ls | grep flip_Extract the archives into the volumes (run the commands from the directory with the archives; take the volume names from the docker volume ls output):
docker run --rm -v docker-compose_flip_postgres:/data -v $(pwd):/backup alpine tar xzf /backup/pg_data.tar.gz -C /data
docker run --rm -v docker-compose_flip_valkey:/data -v $(pwd):/backup alpine tar xzf /backup/valkey_data.tar.gz -C /data
docker run --rm -v docker-compose_flip_minio:/data -v $(pwd):/backup alpine tar xzf /backup/minio_data.tar.gz -C /data5. Starting the application
If the domain has changed, update the configuration files and certificates. To start the application:
docker compose up -d
docker compose psYou don't need to create a bucket or upload media resources: the data is already in the MinIO volume.