Unlike volatile memory (like RAM), hard drives store information in a physical way so that even if we leave them without power, the data is not lost. However, this does not mean that they can store data perennially, and in fact if you have a hard drive kept in a drawer for too long, you will potentially end up losing the data on it.
The typical warranty for a hard drive is 5 years; This number assumes regular use of the device, and if you use it only sporadically, away from electromagnetic interference and at ideal room temperature and humidity conditions, it can probably last you many more years. But what if you never connect the hard drive to the electrical current? Will the data still be there if you plug in a hard drive in, say, 20 years?

The data on your hard drive has an expiration date
The ability of storage devices to retain the data they contain intact is known as the data retention rate. The actual rate for devices that do not have power and do not experience data updates (not having power, forgive redundancy) depends largely on the environmental conditions in which they are stored, ideal conditions being a cool and dry environment and wherein the temperature is kept constant at 25 ° C.

Under these ideal conditions, a hard drive is expected to retain your data for a period of 10-20 years . This is so for different conditions:
- Deterioration of the magnetic field : as you know, traditional hard drives use a magnetic field, which gradually loses its intensity with a cadence of approximately 1% per year. Thus, after 69 years the magnetic field of a hard disk will have been reduced by half, but it does not take that much for corruption of the stored data to occur, in addition to the loss of track marks and file index disk (it is what tells the head where each sector begins and ends).
- Magnetic Field Corruption : Magnetic fields external to those of the hard drive itself can adversely affect stored data by altering the load at one or more locations. Magnetic disruption can be caused by magnets, high-powered motors, or even electrical storms. Likewise, users tend to store hard drives together, one on top of the other, and this is bad because even slightly, the field of one interferes with the other.
- Environmental Conditions : The humidity and temperature ranges of hard drives differ by manufacturer. For example, Western Digital recommends storing your hard drives between 12 and 32ºC. Too high or too low temperatures can also speed up the hard disk data degradation process, too much humidity can cause the heads to become deformed or the shaft and motor to become misaligned.
So is it good to connect hard drives from time to time?
Definitely yes, and it’s what is known in the industry as “exercising the puck.” It is advisable to connect the hard drive from time to time (be it an internal disk or USB), say once every two years at least, as this will reduce the deterioration of the stored data. In fact, it is advisable to “refresh” the entire hard drive; this is creating an image of the disk, formatting it and reloading the image inside it, which will serve to rewrite all the data and its indexes in order to make sure that it is still good.

In any case, even if you don’t do a complete refresh of the hard drive, it is always advisable to connect it and leave it on for a few hours every so often, because at least when you connect it, the index will be read. You can also CHKDSK the drive to make sure all the data is correct.