Skip to main content

Upgrade from v1 to v2

No Custom External Object Storage Usage

For file v1 environments that have not customized external object storage usage, first check the .minio.sys/format.json file in the file v1 data directory. If the format field contains xl or xl-single, you can upgrade using the smooth update method; otherwise, you need to perform a version upgrade through migration.

Smooth Update

  1. First, stop the file v1 service.

  2. Rename the /data/file directory to /data/minio (modify the actual path accordingly).

  3. Refer to the MinIO deployment documentation to deploy the MinIO service.

    • Essentially: Deploy the new MinIO service; the MinIO service reuses data from file v1.
  4. Deploy the file v2 service using MinIO object storage.

Migration Update

  1. Refer to the MinIO deployment documentation to deploy the MinIO service.

  2. Enter the MinIO container (if in a cluster, enter any container).

  3. Configure the connection information between the old file service and the new MinIO service.

    mc alias set minio_old  http://10.206.0.6:9001 storage RjfxxxxxxxxxihTkE
    mc alias set minio_new http://10.206.0.6:9011 mingdao T7RxxxxxxxxxxdRky
  4. Create four buckets in MinIO.

    mc mb minio_new/mdmedia
    mc mb minio_new/mdoc
    mc mb minio_new/mdpic
    mc mb minio_new/mdpub
  5. Synchronize data from the file service to MinIO.

    mc mirror minio_old/mdmedia minio_new/mdmedia
    mc mirror minio_old/mdoc minio_new/mdoc
    mc mirror minio_old/mdpic minio_new/mdpic
    mc mirror minio_old/mdpub minio_new/mdpub
    • If you encounter errors that prevent migration, you can add the --watch parameter to ignore errors and continue migration, for example: mc mirror --watch minio_old/mdmedia minio_new/mdmedia.

    • Generally, the watch parameter is not needed unless some files cannot be exported. Please record and contact technical support if you encounter export issues.

  6. After migration, deploy the file v2 service using MinIO object storage.

Custom External Object Storage Usage

For file v1 environments that have already customized external object storage usage, upgrading to file v2 is much simpler. The general steps are as follows:

  1. Download the file v2 version image.

  2. Modify the source file.yaml file to specify the image version number as v2.

  3. Modify the source file.yaml file to change the variable names MINIO_ACCESS_KEY and MINIO_SECRET_KEY to ENV_ACCESS_KEY_FILE and ENV_SECRET_KEY_FILE, respectively, without changing the variable values.

    • MINIO_ACCESS_KEY --> ENV_ACCESS_KEY_FILE

    • MINIO_SECRET_KEY --> ENV_SECRET_KEY_FILE

  4. Restart the file service.