Salting is one way that food was preserved in times past, as was fermenting. My Memere would salt scallions down in the spring, packing many, many chopped green onions into jars with thick layers of salt and storing them in the fridge (probably in the cellar before electricity and refrigeration was available on the farm) until fresh scallions were available the following spring.
In the days before industrialized food, pickled foods and condiments were fermented. Think sauerkraut. This was a way to have a high vitamin C food that would keep for months and could travel easily on ships, preventing scurvy on long voyages.
I combined these two methods to preserve my garlic, and it was a huge success. I still have a bit left and it is mid-February. Next year I'll put up more, since I do give some away.
You can buy ready made airlock jars for fermenting, but I just can't seem to look at anything without asking myself if I can make it. So I did. Since drilling the glass lids of my few precious Fido jars didn't seem like a good idea (although I asked around and it can be done, find someone who works with stained glass or maybe someone who repairs and replaces windshields on cars.) I used what I already had on hand from my wine making ventures.
Oh, and I did make a gallon of garlic wine for cooking, it is still bubbling away. Onion wine is fantastic to cook with, and I can't wait to try this one out.