Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do a reindex in background or detached mode #38

Open
MiguelAngel82 opened this issue Aug 8, 2018 · 1 comment
Open

Do a reindex in background or detached mode #38

MiguelAngel82 opened this issue Aug 8, 2018 · 1 comment

Comments

@MiguelAngel82
Copy link

Hello all.

I've tried to execute the script in background mode (from a command line with &) but I haven't been able to run it and keep the output result in a file (for example).

If is run it as:

elasticsearch-reindex -f http://localhost:9200/index -t https:/<new_elastic>:9200 indexer.js &

The output reindexing [--------------------------------------] 0/2998080(0%) 270.5 0.0s - 1/30 working is still shown and the script is not executed in background mode.

If is run in background and sending output to a file, like:

elasticsearch-reindex -f http://localhost:9200/index -t https:/<new_elastic>:9200 indexer.js 1> /var/tmp/es-reindex.log &

In this file is saved this output:

Starting reindex in 30 shards.
Reindexing completed sucessfully.

But the output reindexing [--------------------------------------] ... is missing.

Is there any way to run it in backgorund keeping the output?

Thanks in advance.

Regards,
Miguel.

@hacfi
Copy link

hacfi commented Aug 8, 2018

The npm package progress is used for that. I'm not too familiar with the topic but I think it requires tty to display the progress bar which is not available when you don't use a terminal window and just log it to a file. I could be wrong though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants