@@ -208,17 +208,16 @@ function backup_component() {
208208 local component=$2
209209 local requested_component=$3
210210 local migration_id=$4
211- local internal=$5
212211
213212 local stack
214- stack=$( get_stack_for_namespace_component " $namespace " " $component " " $internal " )
213+ stack=$( get_stack_for_namespace_component " $namespace " " $component " )
215214
216215 if [ " $component " == " $requested_component " ] || [ -z " $requested_component " ]; then
217216 if [ " $component " == " cometbft-$migration_id " ]; then
218217 backup_pvc " cometBFT" " $namespace " " global-domain-$migration_id -cometbft-cometbft-data" " $migration_id "
219218 else
220219 local db_name
221- db_name=$( create_component_instance " $component " " $migration_id " " $namespace " " $internal " )
220+ db_name=$( create_component_instance " $component " " $migration_id " " $namespace " )
222221 SPLICE_SV=$namespace SPLICE_MIGRATION_ID=$migration_id backup_postgres " $component " " $namespace " " $db_name -pg" " $migration_id " " $stack "
223222 fi
224223 else
@@ -231,16 +230,15 @@ function wait_for_backup() {
231230 local component=$2
232231 local requested_component=$3
233232 local migration_id=$4
234- local internal=$5
235233
236234 local stack
237- stack=$( get_stack_for_namespace_component " $namespace " " $component " " $internal " )
235+ stack=$( get_stack_for_namespace_component " $namespace " " $component " )
238236
239237 if [ " $component " == " $requested_component " ] || [ -z " $requested_component " ]; then
240238 if [ " $component " == " cometbft-$migration_id " ]; then
241239 wait_for_pvc_backup " cometBFT" " $namespace " " global-domain-$migration_id -cometbft-cometbft-data"
242240 else
243- instance=$( create_component_instance " $component " " $migration_id " " $namespace " " $internal " )
241+ instance=$( create_component_instance " $component " " $migration_id " " $namespace " )
244242 wait_for_postgres_backup " $component " " $namespace " " $instance -pg" " $migration_id " " $stack "
245243 fi
246244 else
@@ -249,45 +247,44 @@ function wait_for_backup() {
249247}
250248
251249function usage() {
252- echo " Usage: $0 <sv|validator> <namespace> <migration id> <internal (true|false)> [<component_name>]"
250+ echo " Usage: $0 <sv|validator> <namespace> <migration id> [<component_name>]"
253251}
254252
255253function main() {
256- if [ " $# " -lt 4 ]; then
254+ if [ " $# " -lt 3 ]; then
257255 usage
258256 exit 1
259257 fi
260258
261259 local namespace=$2
262260 local migration_id=$3
263- local internal=$4 # "true" for internal stack, "false" for external stack
264- local requested_component=" ${5:- } "
261+ local requested_component=" ${4:- } "
265262
266263 # TODO(#9361): support multiple domains / non-default-ID'd ones
267264 if [ " $1 " == " validator" ]; then
268265 _info " Backing up validator $namespace "
269- backup_component " $namespace " " validator" " $requested_component " " $migration_id " " $internal "
270- wait_for_backup " $namespace " " validator" " $requested_component " " $migration_id " " $internal "
266+ backup_component " $namespace " " validator" " $requested_component " " $migration_id "
267+ wait_for_backup " $namespace " " validator" " $requested_component " " $migration_id "
271268 # CN apps must be strictly before participant, so we sync on apps before starting the participant backup
272- backup_component " $namespace " " participant" " $requested_component " " $migration_id " " $internal "
273- wait_for_backup " $namespace " " participant" " $requested_component " " $migration_id " " $internal "
269+ backup_component " $namespace " " participant" " $requested_component " " $migration_id "
270+ wait_for_backup " $namespace " " participant" " $requested_component " " $migration_id "
274271 elif [ " $1 " == " sv" ]; then
275272 _info " Backing up SV node $namespace "
276273
277- backup_component " $namespace " " cn-apps" " $requested_component " " $migration_id " " $internal "
278- backup_component " $namespace " " mediator" " $requested_component " " $migration_id " " $internal "
279- backup_component " $namespace " " sequencer" " $requested_component " " $migration_id " " $internal "
280- backup_component " $namespace " " cometbft-$migration_id " " $requested_component " " $migration_id " " $internal "
274+ backup_component " $namespace " " cn-apps" " $requested_component " " $migration_id "
275+ backup_component " $namespace " " mediator" " $requested_component " " $migration_id "
276+ backup_component " $namespace " " sequencer" " $requested_component " " $migration_id "
277+ backup_component " $namespace " " cometbft-$migration_id " " $requested_component " " $migration_id "
281278
282- wait_for_backup " $namespace " " cn-apps" " $requested_component " " $migration_id " " $internal "
279+ wait_for_backup " $namespace " " cn-apps" " $requested_component " " $migration_id "
283280
284281 # CN apps must be strictly before participant, so we sync on apps before starting the participant backup
285- backup_component " $namespace " " participant" " $requested_component " " $migration_id " " $internal "
282+ backup_component " $namespace " " participant" " $requested_component " " $migration_id "
286283
287- wait_for_backup " $namespace " " participant" " $requested_component " " $migration_id " " $internal "
288- wait_for_backup " $namespace " " mediator" " $requested_component " " $migration_id " " $internal "
289- wait_for_backup " $namespace " " sequencer" " $requested_component " " $migration_id " " $internal "
290- wait_for_backup " $namespace " " cometbft-$migration_id " " $requested_component " " $migration_id " " $internal "
284+ wait_for_backup " $namespace " " participant" " $requested_component " " $migration_id "
285+ wait_for_backup " $namespace " " mediator" " $requested_component " " $migration_id "
286+ wait_for_backup " $namespace " " sequencer" " $requested_component " " $migration_id "
287+ wait_for_backup " $namespace " " cometbft-$migration_id " " $requested_component " " $migration_id "
291288 else
292289 usage
293290 exit 1
0 commit comments