Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
6
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gitlab-com
migration
Commits
ee14c522
Unverified
Commit
ee14c522
authored
Jul 26, 2018
by
John T Skarbek
Browse files
Removes the use of `readarray`
Signed-off-by:
John T Skarbek
<
jtslear@gmail.com
>
parent
eeaa2bb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/snapshot-dbs
View file @
ee14c522
...
...
@@ -10,8 +10,11 @@ else
AZ_RESOURCE_GROUP
=
"PostgresStaging"
fi
declare
-r
disk_list
=
'gcloud compute --project $GCP_PROJECT disks list --filter="name~'
^postgres-.
*
-data
'" --uri'
declare
-a
GCP_DISKS
readarray
-t
GCP_DISKS < <
(
gcloud compute
--project
$GCP_PROJECT
disks list
--filter
=
"name~'^postgres-.*-data'"
--uri
)
GCP_DISKS
=(
$(
awk
-F
=
'{print $1}'
<
(
eval
$disk_list
)
)
)
gcloud compute
--project
$GCP_PROJECT
disks snapshot
"
${
GCP_DISKS
[@]
}
"
&
for
disk_name
in
`
az disk list
-g
$AZ_RESOURCE_GROUP
-o
tsv
--query
"[*].name"
`
;
do
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment