@@ -269,7 +269,7 @@ func addRemoteBucket(ctx context.Context, client MinioAdmin, params models.Creat
269269 return bucketARN , err
270270}
271271
272- func addBucketReplicationItem (ctx context.Context , session * models.Principal , minClient minioClient , bucketName , prefix , arn , destinationBucket string , repDelMark , repDels , repMeta bool , tags string ) error {
272+ func addBucketReplicationItem (ctx context.Context , session * models.Principal , minClient minioClient , bucketName , prefix , destinationARN string , repDelMark , repDels , repMeta bool , tags string ) error {
273273 // we will tolerate this call failing
274274 cfg , err := minClient .getBucketReplication (ctx , bucketName )
275275 if err != nil {
@@ -310,15 +310,15 @@ func addBucketReplicationItem(ctx context.Context, session *models.Principal, mi
310310 }
311311
312312 opts := replication.Options {
313- RoleArn : arn ,
314- Priority : fmt . Sprintf ( "%d" , maxPrio ) ,
315- RuleStatus : "enable" ,
316- DestBucket : destinationBucket ,
317- Op : replication . AddOption ,
318- TagString : tags ,
319- ReplicateDeleteMarkers : repDelMarkStatus ,
320- ReplicateDeletes : repDelsStatus ,
321- ReplicaSync : repMetaStatus ,
313+ Priority : fmt . Sprintf ( "%d" , maxPrio ) ,
314+ RuleStatus : "enable" ,
315+ DestBucket : destinationARN ,
316+ Op : replication . AddOption ,
317+ TagString : tags ,
318+ ExistingObjectReplicate : "enable" , // enabled by default
319+ ReplicateDeleteMarkers : repDelMarkStatus ,
320+ ReplicateDeletes : repDelsStatus ,
321+ ReplicaSync : repMetaStatus ,
322322 }
323323
324324 err2 := mcClient .setReplication (ctx , & cfg , opts )
@@ -363,7 +363,6 @@ func setMultiBucketReplication(ctx context.Context, session *models.Principal, c
363363 sourceBucket ,
364364 params .Body .Prefix ,
365365 arn ,
366- targetBucket ,
367366 params .Body .ReplicateDeleteMarkers ,
368367 params .Body .ReplicateDeletes ,
369368 params .Body .ReplicateMetadata ,
0 commit comments