Encryption and Compression
This section guides you through configuring encryption and compression for S3-compatible storage using the MinIO Client (mc). 
Encryption ensures data security, while compression optimizes storage usage.
Step 1: Install MinIO Client
The MinIO Client allows you to interact with your MinIO server. The MinIO Server provides an S3-compatible API and supports core S3 features.
The MinIO Server provides an S3-compatible API and supports core S3 features. Choose one of the following installation methods for Linux:
RPM (RHEL-based Systems)
- Download the latest stable MinIO RPM package. Install the package using - dnf:
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio-20241218131544.0.0-1.x86_64.rpm -O minio.rpm
sudo dnf install minio.rpmDEB (Debian/Ubuntu Systems)
- Download the appropriate - .debpackage from the MinIO Downloads Page. Install the package using- dpkg:
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20241218131544.0.0_amd64.deb -O minio.deb
sudo dpkg -i minio.debBinary Installation (Universal Method)
- Download the MinIO Server binary. Make the binary executable and move the binary to a directory in your system PATH: 
wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
sudo mv minio /usr/local/bin/Installing MinIO Client (mc)
The MinIO Client allows command-line interaction with your MinIO server.
- Download the MinIO Client binary: - wget https://dl.min.io/client/mc/release/linux-amd64/mc
- Make the binary executable: - chmod +x mc
- Move the binary to a directory in your system PATH: - sudo mv mc /usr/local/bin/mc
- Verify the installation: - mc --version
For other operating systems, refer to this resource.
Step 2: Set Up mc Alias
- Set an alias for your server: - mc alias set zcn https://<BLIMP_DOMAIN> <ACCESS_KEY> <SECRET_KEY> --api S3v2- Replace - <BLIMP_DOMAIN>with the domain link from the Blimp output.
- Replace - <ACCESS_KEY>and- <SECRET_KEY>with your credentials.
 - Example: - mc alias set zcn https://blimpibh5l.zus.network shahnawaz rootroot --api S3v2
- Verify the alias setup by listing buckets: - mc ls zcn
Step 3: Create a Bucket
- Create a bucket for storing encrypted and compressed data: - mc mb zcn/encryption-compression
- Confirm the bucket creation by listing the contents: - mc ls zcn
Step 4: Upload Files with Compression
- Copy files or directories recursively to the bucket, applying compression: - mc cp --recursive ../mc/docs zcn/encryption-compression/- Example commands: - mc cp --recursive ../mc/docs zcn/encryption-compression/ mc cp --recursive ../mc/buildscripts zcn/encryption-compression/ mc cp --recursive ../mc/primary zcn/encryption-compression/
- List the contents of the bucket to verify the upload: - mc ls zcn/encryption-compression/
Step 5: Test Encryption
- Ensure that the uploaded files are encrypted on the server by verifying through: - mc stat zcn/encryption-compression/<FILE_NAME>- Replace - <FILE_NAME>with the name of any uploaded file.
- Check the metadata to confirm encryption. 
 
- To download and decrypt, use: - mc cp zcn/encryption-compression/<FILE_NAME> /local/path/
Notes
- Recursive Upload: Use the - --recursiveflag to upload entire directories.
- Bucket Verification: Always verify the presence of the bucket and its contents after each operation. 
- Compression: Compression is applied automatically during file transfer. Ensure that the server supports compression for optimal results. 
- Encryption: Encryption is configured at the server level. Confirm the settings in your ZS3Server configuration to enable encryption. 
Last updated