******************************** بسم الله الرحمن الرحیم ********************************

# 1-نصب #

> Install Node.js + NPM

```r
sudo apt install nodejs npm
```
> Install helper package to get latest Node.js + NPM versions

```r
sudo npm install n -g 
```
> Install Elasticdump globally on your local machine

```r
sudo npm install elasticdump -g 
```

> show version

```r
sudo elasticdump --version
```

> for example: 6.71.0    

# 2- پشتیبان گیری #

> make backup dir

```r
sudo mkdir /home/backup
```
> with out auth 

```r
sudo elasticdump --input=http://127.0.0.1:6900/index --output=/home/backup/change_logindex.json --type=data
```

> with auth

```r
sudo elasticdump --input=https://username:password@127.0.0.1:6900/index --output=/home/backup/change_logindex.json --type=data
```

 ## می تواند بگیرد --type مقادیری که ##

>default: data, options:(index, settings, analyzer, data, mapping, policy, alias, template,         component_template, index_template)
 

# 3- بازیابی #
> with out auth

```r
sudo elasticdump --input=/home/backup/change_logindex.json --output=http://127.0.0.1:6900/index --type=data
```

> with auth

```r
elasticdump --input=/home/backup/change_logindex.json --output=https://username:password@127.0.0.1:6900/index --type=data
```

******************************** در پناه حق ********************************
