Last active
April 12, 2023 09:51
-
-
Save prakashsvmx/a2be7038b9ca0337adf4191c87e3bdf1 to your computer and use it in GitHub Desktop.
Revisions
-
prakashsvmx renamed this gist
Apr 12, 2023 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
prakashsvmx revised this gist
Apr 12, 2023 . 1 changed file with 3 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,11 +3,11 @@ replicate: # source of the objects to be replicated source: type: minio # valid values are "minio" bucket: old-minio-versioned-bucket prefix: "" # 'PREFIX' is optional # NOTE: if source is remote then target must be "local" # Source is an old version of MinIO endpoint: "http://localhost:15000" credentials: accessKey: minio secretKey: minio123 @@ -16,7 +16,7 @@ replicate: # target where the objects must be replicated target: type: minio # valid values are "minio" bucket: new-minio-versioned bucket prefix: "" # 'PREFIX' is optional # NOTE: if target is remote then source must be "local" # Target is a new version of MinIO - This is where the objects would land. @@ -70,6 +70,3 @@ replicate: # Note the batch job id for checking status # mc batch status local22 <jopbid> # mc batch list local22 -
prakashsvmx created this gist
Apr 3, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,75 @@ replicate: apiVersion: v1 # source of the objects to be replicated source: type: minio # valid values are "minio" bucket: test-v-bucket prefix: "" # 'PREFIX' is optional # NOTE: if source is remote then target must be "local" # Source is an old version of MinIO endpoint: "http://localhost:22001" credentials: accessKey: minio secretKey: minio123 # sessionToken: SESSION-TOKEN # Optional only available when rotating credentials are used # target where the objects must be replicated target: type: minio # valid values are "minio" bucket: test-vs-bucket prefix: "" # 'PREFIX' is optional # NOTE: if target is remote then source must be "local" # Target is a new version of MinIO - This is where the objects would land. endpoint: "http://localhost:22000" credentials: accessKey: minio secretKey: minio123 # sessionToken: SESSION-TOKEN # Optional only available when rotating credentials are used # NOTE: All flags are optional # - filtering criteria only applies for all source objects match the criteria # - configurable notification endpoints # - configurable retries for the job (each retry skips successfully previously replaced objects) #flags: #filter: #newerThan: "7d" # match objects newer than this value (e.g. 7d10h31s) #olderThan: "7d" # match objects older than this value (e.g. 7d10h31s) #createdAfter: "date" # match objects created after "date" #createdBefore: "date" # match objects created before "date" ## NOTE: tags are not supported when "source" is remote. # tags: # - key: "name" # value: "pick*" # match objects with tag 'name', with all values starting with 'pick' ## NOTE: metadata filter not supported when "source" is non MinIO. # metadata: # - key: "content-type" # value: "image/*" # match objects with 'content-type', with all values starting with 'image/' notify: endpoint: "http://localhost:8080" # notification endpoint to receive job status events #token: "Bearer xxxxx" # optional authentication token for the notification endpoint retry: attempts: 10 # number of retries for the job before giving up delay: "500ms" # least amount of delay between each retry # Running migration between 2 MinIO instances # Create alias for both and note the API endpoints # oldminio - 2022-01-08T03:11:54Z # local22 - 2023-03-31T21:38:10Z # run the commands on the local22 instance of MinIO # mc version RELEASE.2023-03-23T20-03-04Z # mc batch generate local22 replicate > replication.yaml # Update as per the above configuration . comment un wanted blocks like filter # mc batch start local22 ./replication.yaml # Note the batch job id for checking status # mc batch status local22 <jopbid> # mc batch list local22 # NOTE: If the target bucket is UN-VERSIONED, DEL markers will NOT be copied, but all OBJECT Versions WILL BE copied. # NOTE: If the target bucket is VERSIONED/SUSPENDED, DEL markers WILL BE copied along with other object versions.