About time I find a subject here I know something about. I live off-grid all the time.
You didn't say how many lights, and how long do you expect to be without power, and how much sun you get. So without those numbers, I can only give tips.
Running a pure 12V system is expensive. Todays solar panels run at 24V so they can be chained into larger arrays and keep the amps low. 12V panels are not made in bulk like the 24V. The price per wall for most 12V solar panels is around 2-4$ per watt. 24V panels are 0.50$ per watt. So you will easily be paying double for panels to stick with 12V. And most 12V panels are smaller wattage, so you need more of them, complicating the mounting.
How do you plan to "convert" the lighting to 12V? Split the feed out at the beaker panel? Having both 12V and 120V in the same panel is not up to code in most US states and not a good idea. Then you have to find 12V lights and convert fixtures. If you are doing a few, this adds cost. Inverters are cheap, and end up costing less then the mess of a rewiring for a duel voltage cabin.
Here is what I would do, and have done on other places.
Get a Xantrex TR1524 inverter, or a used Trace DR series. Both basically the same inverter. I have an older Trace DR that has been in continuous operation for 12 years now as a online UPS system. Dead reliable and work perfect for this application.
The entire cabin wires into the OUT of the inverter, and the grid wires into the IN. Batteries wire into the battery post. Golf cart T-105 6V 220Ah are the best bang for the buck still, if short lived compared to sealed batteries that cost a lot more.
When the grid is up, the inverter passes though the power and switches into charge mode charging the batteries. When the grid is down, the inverter run the loads. It's exactly like a big UPS.
The batteries must be sized to handle how long you plan to run without grid power. Hours/Days/Weeks?
Now say you want to run solar. First let me say running solar while the grid is available silly in most cases. You are just using up your batteries. It's not cost affective when you have power already to the cabin.
However, to do what you want, aka, kick the inverter over to grid to charge the batteries only when they are very low, you use a voltage controlled switch. They are easy to find on amazon. Set it to turn on at around 40%SOC and off at 60%SOC. The switch controls a large solid state relay that is in series between the grid and your inverter.
Bingo, everything is robust and transparent to the cabin users and wife approved.
If you expect to be without power, but have lots of sun (the two generally don't happen at the same time that often), you can have solar panels as backup. Say if you are without power for a week. If the grid goes down, the panels will keep things going and the beer cold. When the grid is up, the panels are not doing anything, but with so few panels, you are not really missing anything. I would still not do the voltage controlled relay as I would prefer to bring up the batteries to full SOC as soon as I can in case the power cuts out again in a few hours, and the panels are not making any power due to a snow storm.
Let me recap. Doing a small off-grid solar system where grid power already exist is not going to save you money as the cost of replacing your batteries every few years, plus the cost of the system is going to get you in the wallet.
If you need a big UPS, then do a big UPS and float the batteries, saving them for when you need them.