diff --git a/docs/bucket/replication/setup_3site_replication.sh b/docs/bucket/replication/setup_3site_replication.sh index 6c5cb11b2..1fc5180d6 100755 --- a/docs/bucket/replication/setup_3site_replication.sh +++ b/docs/bucket/replication/setup_3site_replication.sh @@ -175,11 +175,17 @@ mc replicate add sitec/olockbucket/ \ --replicate "existing-objects,delete,delete-marker,replica-metadata-sync" --priority 3 sleep 1 +echo "Set default governance retention 30d" +mc retention set --default governance 30d sitea/olockbucket -echo "Copying data to source sitea" +echo "Copying data to source sitea/bucket" mc cp --quiet /etc/hosts sitea/bucket sleep 1 +echo "Copying data to source sitea/olockbucket" +mc cp --quiet /etc/hosts sitea/olockbucket +sleep 1 + echo "Verifying the metadata difference between source and target" if diff -pruN <(mc stat --json sitea/bucket/hosts | jq .) <(mc stat --json siteb/bucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then echo "verified sitea-> COMPLETED, siteb-> REPLICA" @@ -189,4 +195,13 @@ if diff -pruN <(mc stat --json sitea/bucket/hosts | jq .) <(mc stat --json sitec echo "verified sitea-> COMPLETED, sitec-> REPLICA" fi +echo "Verifying the metadata difference between source and target" +if diff -pruN <(mc stat --json sitea/olockbucket/hosts | jq .) <(mc stat --json siteb/olockbucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then + echo "verified sitea-> COMPLETED, siteb-> REPLICA" +fi + +if diff -pruN <(mc stat --json sitea/olockbucket/hosts | jq .) <(mc stat --json sitec/olockbucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then + echo "verified sitea-> COMPLETED, sitec-> REPLICA" +fi + catch