Skip to content

Commit

Permalink
[WIP] Update s3 bucket for mongo replication
Browse files Browse the repository at this point in the history
  • Loading branch information
AgaDufrat committed Jan 25, 2024
1 parent 47c5f91 commit ee4a95e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/replicate-mongodb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ case "$app" in
database="${app//-/_}_production"
;;
"asset-manager")
hostname=mongo-normal
hostname=shared-documentdb
database=govuk_assets_production
;;
*)
hostname=mongo-normal
hostname=shared-documentdb
database="${app//-/_}_production"
;;
esac
Expand All @@ -50,7 +50,7 @@ if [[ -e "$archive_path" ]]; then
else
mkdir -p "$archive_dir"
remote_file_name=$(aws s3 ls "s3://${bucket}/${hostname}/" | grep "[[:digit:]]-$database.gz" | tail -n1 | sed 's/^.* .* .* //')
aws s3 cp "s3://${bucket}/${hostname}/${remote_file_name}" "$archive_path"
aws s3 cp "s3://${bucket}/${hostname}/${remote_file_name}" "$archive_path" --recursive
fi

if [[ -n "${SKIP_IMPORT:-}" ]]; then
Expand Down

0 comments on commit ee4a95e

Please sign in to comment.