Restoring a backup

Restoring to an index which exists is additive - it doesn’t replace the
existing data or delete any documents which don’t exist in the dump.
This means that if the import fails (as it sometimes does), you can simply re-run the command.

Given a directory of dumps named after their respective indices, you can restore them using the same steps as the environment data sync script, elasticsearch-restore.sh.

This will restore each backup into a new index, and then move the alias to point to it.

If you need to change the alias back for any reason, you can run the rummager rake task rummager:switch_to_named_index[foo-2017-01-01...], where foo-2017-01-01... is the name of the index you want to point the alias to. The task will automatically determine the correct alias name from the index name.

Once backups have been restored it is necessary to manually delete the old
indices as otherwise Elasticsearch will eventually run out of disk space and
memory. It’s OK to keep an old index around for a few days in case you need to
roll back. You can delete all the unaliased indices by running the rummager
task: rummager:clean.

Replaying rummager traffic

By restoring an older backup, you will lose any documents that have been updated since the backup was taken.