Skip to main content

Upload Predefined Files

Upload the contents of the predefined file package (data under the four folders: mdmedia, mdpic, mdpub, mdoc) to the corresponding buckets in object storage based on the bucketName mapping relationship.

For common cloud object storage services, you can refer to the documentation for initialization: 明道云 Private Deployment with Alibaba Cloud OSS Initialization Instructions. The methods for uploading files to different cloud object storages are largely similar.

For a locally built MinIO object storage, you can refer to the following example steps:

  1. Download the predefined file package

    wget https://pdpublic.mingdao.com/private-deployment/source/6.3.0/file_init.tar.gz
  2. Extract the predefined file package

    tar xf file_init.tar.gz
  3. Copy the extracted data directory to the MinIO container (if it's a MinIO cluster environment, copy to any single container)

    docker cp data xxx:/tmp
    • Replace xxx with the actual container ID of MinIO
  4. Enter the MinIO container

    docker exec -it xxx bash
  5. Add MinIO service alias

    mc alias set myminio http://127.0.0.1:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD
  6. Create buckets

    mc mb myminio/mdmedia
    mc mb myminio/mdoc
    mc mb myminio/mdpic
    mc mb myminio/mdpub
  7. Upload local predefined files to the corresponding buckets in MinIO object storage

    mc cp -r /tmp/data/mdmedia/* myminio/mdmedia
    mc cp -r /tmp/data/mdpic/* myminio/mdpic
    mc cp -r /tmp/data/mdpub/* myminio/mdpub