Skip to content

Instantly share code, notes, and snippets.

@MahdadGhasemian
Created July 25, 2024 10:26
Show Gist options
  • Save MahdadGhasemian/416476b536f9a1334382065a7c44b33c to your computer and use it in GitHub Desktop.
Save MahdadGhasemian/416476b536f9a1334382065a7c44b33c to your computer and use it in GitHub Desktop.
Steps to backup and restore Minio Buckets

Restore Backup with Minio (Minio <----> Local)

Instructions for restoring buckets using Minio mirror features.

Install Minio Client

Install Link install link

Linux AMD64 DEB:

wget https://dl.min.io/client/mc/release/linux-amd64/mcli_20240722200249.0.0_amd64.deb
sudo dpkg -i mcli_20240722200249.0.0_amd64.deb

Add minio server to minio alias:

mcli alias set myminio/ MINIO_SERVER_URL MINIO_ADMIN_USERNAME MINIO_ADMIN_PASSWORD

Commands:

List all contents of BUCKET_NAME

mcli ls myminio/BUCKET_NAME

Backup to local

mcli mirror myminio/BUCKET_NAME path-to-your-local-backup-folder/BUCKET_NAME --overwrite

Restore from local

mcli mirror path-to-your-local-backup-folder/BUCKET_NAME myminio/BUCKET_NAME --overwrite
@yazanstash-foodics
Copy link

Thank you for this ♥️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment