]> git.openstreetmap.org Git - chef.git/blob - cookbooks/planet/files/default/replication-bin/replicate-day
Tighten timeouts and log request timeouts
[chef.git] / cookbooks / planet / files / default / replication-bin / replicate-day
1 #!/bin/sh
2
3 set -e
4
5 /usr/local/bin/osmosis -q --merge-replication-files workingDirectory=/var/lib/replication/day
6
7 . /store/planet/replication/day/state.txt
8
9 sequencePart1=$(($sequenceNumber / 1000000 % 1000))
10 sequencePart2=$(($sequenceNumber / 1000 % 1000))
11 sequencePart3=$(($sequenceNumber % 1000))
12 diffPath=$(printf "%03d/%03d/%03d" $sequencePart1 $sequencePart2 $sequencePart3)
13
14 /opt/awscli/v2/current/bin/aws --profile=osm-pds-upload s3 cp --storage-class=INTELLIGENT_TIERING --no-progress "/store/planet/replication/day/${diffPath}.osc.gz" "s3://osm-planet-eu-central-1/planet/replication/day/${diffPath}.osc.gz"
15 /opt/awscli/v2/current/bin/aws --profile=osm-pds-upload s3 cp --storage-class=INTELLIGENT_TIERING --no-progress "/store/planet/replication/day/${diffPath}.state.txt" "s3://osm-planet-eu-central-1/planet/replication/day/${diffPath}.state.txt"
16 /opt/awscli/v2/current/bin/aws --profile=osm-pds-upload s3 cp --storage-class=INTELLIGENT_TIERING --no-progress "/store/planet/replication/day/state.txt" "s3://osm-planet-eu-central-1/planet/replication/day/state.txt"