Answering this question is problematic. It's tagged "hard science" but it's worried about the Sun "going out without destroying the Earth" and it wants to do this with "current technology" but for "very long-term storage". The possible time and energy scales are wildly divergent. It's supposed to use current tech and hard science, suggesting a few decades, but they're worried about the Sun going out... which isn't going to happen for billions of years. What time scale are we talking about? A few decades or a few billion years?
If the time scale is in the billions of years, the problem is already solved. The initial gravitational energy of the solar system is stored in a big ball of hydrogen at the center of the solar system, it's slowly being released through nuclear fusion. Mission complete.
What about in the short term? How much energy do you want to store? Our current bulk energy storage can handle about 10^11 Watts and the world uses about 10^16 Watts. To store a meaningful amount of energy we've got five orders of magnitude to catch up on. That's a lot. What would it take?
Pumped storage is the most efficient long term energy storage system we have available. You're basically storing gravitational energy by raising water to a high basin. How much would we need to store one year's worth of energy production? 10^16 Watts is 10^16 Joules/second. There's about 10^7 seconds in a year... 10^23 Joules. One Joule is 100 grams raised one meter. One of the largest existing facilities raises water 380m, let's take an average of about 100m. One Joule is 1 gram raised 100 meters.
To store 10^23 Joules, one year's supply, at 100 meters and ignoring efficiency loss (it's very efficient, about 80%) we'd need 10^23 grams. There's about 10^24 grams of flowing, fresh water on the Earth (ie. rivers) and we'd need 10% of it. That's a lot, and that's only for a year's worth of our current energy consumption.
You could use seawater, but that would increase construction costs and reduce efficiency considerably as places close to the sea tend to not be very high above sea level. You could attempt to use something more dense, but it would need to be easily pumped.
The storage plan has problems, and it only holds off the inevitable... Peak Sunlight!
The Earth receives about 10^17 Watts from the Sun. We're already using 10% of that and world energy demand doubles about every 40 years. If current trends hold, in a few generations we'll be using more energy than we receive from the Sun. There is only one long term solution...
Become a Type II Civilization
Instead of worrying about storing energy, which is hard for the energies and time scales involved, let's stop wasting so much. The Sun outputs a whopping 10^26 Watts and the Earth only gets a billionth of that. What a waste! Why worry about squirreling away scraps under the mattress when we could be gathering a billion times more? Instead of storing the scant amount of power we're getting, squirreling it away under the mattress, let's use that power to gather more! Invest! Make the pie higher! Become a Type II Civilization that collects all the energy from the Sun, or as much as we can feasibly get.
Use energy to build and put satellites into solar orbit to collect solar radiation and beam it back to Earth, eventually forming a Dyson bubble (Dyson Spheres being difficult to build and unstable). Let's do some quick calculations.
Now, how fast can we build this sphere? Let's say we can build and launch satellites at a rate which is a percentage of our total power. Need more materials? Use some power to grab an asteroid! This is basically investing in more power generators. We'll benefit from the power of compound interest, more satellites means more power means more satellites!
Our principal is the energy received by the Earth and the "interest rate" is how efficient we are at launching satellites. I'll assume we get really good at building and launching satellites so we're pretty much doing it all the time, so we can use the continuous compound interest formula.
power production = 10^16W * e ^ (interest * years)
Plotting it in Wolfram Alpha shows at a modest 1% annual increase in energy production means in 240 years we'll be producing 10 times more power than the Earth currently receives with power production on an exponential curve towards a Type II civilization in less than 10,000 years.
No new science is required, just a lot of practical engineering plus the will and time to do it. Solar panels, solar sails, ion engines, asteroid mining, gravity tractors, microwave and laser energy transmission... these are all current or near-term technology.