Breadcrumbs

Minio Data Migration

Follow these steps to migrate data from MinIO docker based container to Kubernetes container

  1. exec into MinIO docker container and navigate to the default location inside container

docker exec -it <minio_container_name> sh
cd data/
  1. Zip the bucket you want to migrate

zip -r <zip_directory_name> <bucket_to_zip>
  1. Exit out of MinIO container and copy the zipped file from inside container to host vm

exit
docker cp <minio_container_name>:<zipped_file_path> <host_vm_path>
  1. copy the zipped file to destination vm

scp <host_vm_zip_file_path> <user>@<dest_vm_ip>:<dest_vm_path>
  1. copy the zipped file to inside pod location

kubectl cp <path_to_file> <namespace>/<pod_name>:<inside_pod_path>
  1. unzip the file with following command

unzip <zipped_file> -d <path_to_unzip>
  1. restart the pod with following command

    kubectl delete <pod_name> -n <namespace>