s3 compatible storage solution. Custom install with docker-compose

s3 compatible storage solution. Custom install with docker-compose
|bash|Backup docker volume and push to minIO|도커볼륨의 백업을 압축후(tar.bz2 포맷) minIO로 업로드하는 script
#!/bin/basharray=(mysql-data,postgres-data,wp-content, mongodbdata ,minio-data)echo "Array size: ${#array[*]}"echo "Array items:"for item in ${array[*]}doprintf " %s\n" $itemdocker run --rm -v $item:/volume -v /tmp:/backup alpine tar -cjf /backup/$item.tar.bz2 -C /volume ./s3cmd -c ~/.s3cfg_minio put /tmp/$item.tar.bz2 s3://backupdone
|bash|Restore code|Get from minIO and restore, minIO backup bucker의 tar.bz2 파일을 다운받은 후 도커볼륨으로 save하는 script
#!/bin/basharray=(mysql-data postgres-data mongodbdata wp-content minio-data)echo "Array items:"for item in ${array[*]}dos3cmd -c ~/.s3cfg_minio_nam --force get s3://backup/$item.tar.bz2 /tmp/volumes=$(docker volume ls)exist=0;for vol in ${volumes[*]}doif [ $vol == $item ]thenexist=1fidoneif [ $exist == 0 ]thendocker volume create $itemdocker run --rm -v $item:/volume -v /tmp:/backup alpine sh -c"rm -rf /volume/* /volume/..?* /volume/.[!.]* ; tar -C /volume/ -xjf /backup/$item.tar.bz2"printf " %s\n" $itemfidone