Page 1 of 1

power outages

Posted: Thu Jun 08, 2017 2:53 am
by covfefee
Hello pi people!

My pi contains sensitive data that I don't want to lose. What is the risk posed by power outages/storms/etc.?

Is it enough that my power outlet has a surge protector, or do I need a UPS to guarantee that nothing is corrupted?

Thanks!

Re: power outages

Posted: Thu Jun 08, 2017 12:55 pm
by Ernst
The first thing you need is a backup policy to safeguard your sensitive information.

Re: power outages

Posted: Thu Jun 08, 2017 12:59 pm
by Martin Frezman
The answer to your question is: Yes. Get a UPS and you're good.

Of course, UPS's do fail (they wear out over time). When it starts beeping, it is time to buy a new one and then you will have to shutdown the Pi to connect it to the new UPS.

Re: power outages

Posted: Thu Jun 08, 2017 1:14 pm
by Ernst
Martin Frezman wrote:The answer to your question is: Yes. Get a UPS and you're good.

Of course, UPS's do fail (they wear out over time). When it starts beeping, it is time to buy a new one and then you will have to shutdown the Pi to connect it to the new UPS.
An UPS is not the solution to the problem of loosing sensitive information, UPS is a continuity feature.
Loosing sensitive information can be caused by hardware problems and software problems, and mostly by user problems.

If in doubt: the write ups of the register (www.theregister.co.uk) on the British Airways and ATO outages are very interesting.

Re: power outages

Posted: Thu Jun 08, 2017 2:43 pm
by jamesh
SD cards fail - that's probably the weakest point. The Linux SW is pretty robust, the HW is pretty robust.

But backup, backup, backup and backup are the ways the protect the data from loss.

Re: power outages

Posted: Thu Jun 08, 2017 7:53 pm
by MaxK1
And be sure to test your backups periodically​!

Re: power outages

Posted: Thu Jun 08, 2017 8:03 pm
by rpdom
MaxK1 wrote:And be sure to test your backups periodically​!
Easy way to do that on a Pi is to backup your SD card to a new SD card. Shut down the Pi. Swap cards and boot up again. If it works then your backup is OK. If it doesn't you just revert back to the old card and try again. The old card then becomes the backup and the new card is the live system.

Re: power outages

Posted: Thu Jun 08, 2017 9:11 pm
by davidcoton
covfefee wrote:My pi contains sensitive data that I don't want to lose.
Do you mean "sensitive" as in personal or commercially confidential (and therefore to be protected from unauthorised access), or as in valuable -- you lose time/income if you lose the data?
In either case backups are essential. Match the backup regime to the value of your data. Valuable data deserves at least two offline copies. In many cases one should be in a different location.

How often does your data change? How much harm is done if your backup is a day old, or a week old? If a day/week is acceptable, then follow rpdom's system and make a daily backup.
Then on Friday take the backup home, and on Monday bring the previous backup back.

If you need better security for fast moving data, you need to look at on-line replication to a second system, with no common point of failure.
(It is always possible to find a common point of failure, you just have to make sure that the likelihood of that event is low wenough to be an acceptable risk.)

If the data is personal, you may need to consider where it is stored and making each location secure. Keeping a copy of personal data (or even some commercial data) at home may not be acceptable.
covfefee wrote:What is the risk posed by power outages/storms/etc.?
The power fauilure can lead to a corrupted (and sometimes unrecoverable) SDCard. If that is your concern, a UPS is necessary -- search for "MoPower" for boards which may suit your need.

Re: power outages

Posted: Thu Jun 08, 2017 9:14 pm
by MaxK1
Unless the pi needs to stay up 24/7.