You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: discovery-data/latest/all-backup-restore.sh
+23-9Lines changed: 23 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -42,8 +42,8 @@ Basically, you don't need these advanced options.
42
42
--datastore-archive-option="<tar_option>" Tar options for compression used on archiving the backup files of ElasticSearch, MinIO and internal configuration. Default "-z".
43
43
--postgresql-archive-option="<tar_option>" Tar options for compression used on archiving the backup files of postgres. Note that the backup files of postgresql are archived on its pod by default. Default "-z".
44
44
--etcd-archive-option="<tar_option>" Tar options used on archiving the backup files of etcd. Note that the backup files of etcd are archived on its pod by default. Default "-z".
45
-
--reindex-old-index Reindex elastic search indices from version 6 to 7 before making the backup. If existing elastic search indices version is already 7, this flag does nothing. They have to be reindexed if you want to restore to 4.8.x. Reindex actually won't change your data, but it takes time. If you want to make the backup without reindex, use '--ignore-old-index' instead.
46
-
--ignore-old-index Whether to skip reindexing old (version 6) elastic search indices before making the backup. You can proceed backup without reindex, but you can't restore the backup data to 4.8.x.
45
+
--reindex-old-index Reindex old Elasticsearch indices before making a backup. If you want to restore into 4.8.6 and later, you'll need to reindex to elasticsearch7. If you want to restore into 5.3.0 and later, you'll need to reindex to opensearch2. Reindex actually won't change your data, but it takes time. If you want to make the backup without reindex, use '--ignore-old-index' instead.
46
+
--ignore-old-index Whether to skip reindexing old elastic search indices before making the backup.
47
47
--skip-verify-archive Skip the all verifying process of the archive.
48
48
--skip-verify-backup Skip verifying the backup file.
49
49
--skip-verify-datastore-archive Skip verifying the archive of datastores.
@@ -381,9 +381,9 @@ if ! "${BACKUP_RESTORE_IN_POD:-false}" ; then
381
381
fi
382
382
383
383
if [ ${COMMAND}='backup' ] ;then
384
-
if [ $(compare_version "${WD_VERSION}""5.2.0")-lt 0 ] ;then
385
-
ELASTIC_VERSION=$(get_elastic_version)
386
-
validate_elastic_version"${ELASTIC_VERSION}"
384
+
if [ $(compare_version "${WD_VERSION}""5.3.0")-lt 0 ] ;then
brlog "INFO""Elasticsearch 6 will be reindexed after quiescing."
1372
+
else
1373
+
brlog "ERROR""Detected old index created in ElasticSearch 6 that is not supported in Watson Discovery 4.8.x. They have to be reindexed into elasticsearch7 if you want to restore to 4.8.x or higher. Please reindex into elasticsearch7 using Watson Discovery verison less than 5.2.2. If you would like to ignore the error, run backup script with '--ignore-old-index' option."
1374
+
exit 1
1375
+
fi
1350
1376
else
1351
1377
brlog "ERROR""Detected old index created in ElasticSearch 6 that is not supported in Watson Discovery 4.8.x. They have to be reindexed if you want to restore to 4.8.x or higher. Reindex actually won't change your data, but it takes time. Run the backup script with '--reindex-old-index' option if you want to reindex them. You can proceed the backup without reindex, but you can't restore the backup data to 4.8.x. If you would like to ignore the error, run backup script with '--ignore-old-index' option."
brlog "INFO""Elasticsearch 7 will be reindexed after quiescing."
1389
+
else
1390
+
brlog "ERROR""Detected old index created in ElasticSearch 7 that is not supported in Watson Discovery 5.3.x. They have to be reindexed into opensearch2 if you want to restore to 5.3.x or higher. Please reindex into opensearch2 using Watson Discovery versions between 4.8.6 and below 5.3.0. If you would like to ignore the error, run backup script with '--ignore-old-index' option."
1391
+
exit 1
1392
+
fi
1393
+
else
1394
+
brlog "ERROR""Detected old index created in ElasticSearch 7 that is not supported in Watson Discovery 5.3.x. They have to be reindexed if you want to restore to 5.3.x or higher. Reindex actually won't change your data, but it takes time. Run the backup script with '--reindex-old-index' option if you want to reindex them. You can proceed the backup without reindex, but you can't restore the backup data to 5.3.x. If you would like to ignore the error, run backup script with '--ignore-old-index' option."
1395
+
exit 1
1396
+
fi
1397
+
fi
1355
1398
}
1356
1399
1357
-
# Reindex elastic search indices from version 6 to 7.
0 commit comments