The correct answer for this question is 'Surge protector' because surge protectors are designed to protect electronic devices from power surges and spikes, which can occur during power failures. By using a surge protector, the electronic device is shielded from potential damage caused by sudden increases in voltage, thus preventing data loss. This makes surge protectors an essential tool for safeguarding data during power failures.