From 2e26a8ca90249ccad0b8ded80b5a75aa43d139bb Mon Sep 17 00:00:00 2001 From: Florent Date: Fri, 8 Oct 2021 17:18:33 +0200 Subject: [PATCH] We cannot rely on the dump extension --- scripts/upgrade | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e1e5920..65ef44f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -96,7 +96,8 @@ then do sleep 5 done - cp $final_path/dumps/$dump_id.tar.gz $DUMPS_DIR + # Depending on the version, the dump extension can be either a .tar.gz or a .dump (both are actually .tar.gz files) + mv $final_path/dumps/$dump_id.* $DUMPS_DIR ynh_print_info --message="Dumping done!" fi @@ -191,7 +192,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then tmp_dump_logs="$(mktemp -p $DUMPS_DIR)" ynh_debug --message="Running import command" - /usr/bin/meilisearch --db-path $DUMPS_DIR/data.ms --import-dump $DUMPS_DIR/$dump_id.tar.gz --master-key $master_key --http-addr 127.0.0.1:$port --no-analytics true &> $tmp_dump_logs & + /usr/bin/meilisearch --db-path $DUMPS_DIR/data.ms --import-dump $DUMPS_DIR/$dump_id.* --master-key $master_key --http-addr 127.0.0.1:$port --no-analytics true &> $tmp_dump_logs & dump_pid=$! dump_timeout=300 for i in $(seq $dump_timeout)