mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2024-07-01 10:33:50 +02:00
52 lines
1.4 KiB
Markdown
52 lines
1.4 KiB
Markdown
---
|
|
title: "February, 2021"
|
|
date: 2021-02-01T10:13:54+02:00
|
|
author: "Alan Orth"
|
|
categories: ["Notes"]
|
|
---
|
|
|
|
## 2021-02-01
|
|
|
|
- Check the results of the AReS harvesting from last night:
|
|
|
|
```console
|
|
$ curl -s 'http://localhost:9200/openrxv-items-temp/_count?q=*&pretty'
|
|
{
|
|
"count" : 100875,
|
|
"_shards" : {
|
|
"total" : 1,
|
|
"successful" : 1,
|
|
"skipped" : 0,
|
|
"failed" : 0
|
|
}
|
|
}
|
|
```
|
|
|
|
<!--more-->
|
|
|
|
- Set the current items index to read only and make a backup:
|
|
|
|
```console
|
|
$ curl -X PUT "localhost:9200/openrxv-items/_settings" -H 'Content-Type: application/json' -d'
|
|
{"settings": {"index.blocks.write":true}}'
|
|
$ curl -s -X POST http://localhost:9200/openrxv-items/_clone/openrxv-items-2021-02-01
|
|
```
|
|
|
|
- Delete the current items index and clone the temp one to it:
|
|
|
|
```console
|
|
$ curl -XDELETE 'http://localhost:9200/openrxv-items'
|
|
$ curl -X PUT "localhost:9200/openrxv-items-temp/_settings" -H 'Content-Type: application/json' -d'{"settings": {"index.blocks.write": true}}'
|
|
$ curl -s -X POST http://localhost:9200/openrxv-items-temp/_clone/openrxv-items
|
|
```
|
|
|
|
- Then delete the temp and backup:
|
|
|
|
```console
|
|
$ curl -XDELETE 'http://localhost:9200/openrxv-items-temp'
|
|
{"acknowledged":true}%
|
|
$ curl -XDELETE 'http://localhost:9200/openrxv-items-2021-02-01'
|
|
```
|
|
|
|
<!-- vim: set sw=2 ts=2: -->
|