There are many time-honored ways to preserve vegetables, such as canning or freezing.

But one method actually helps foster healthy gut bacteria, which can boost the immune system and aid in digestion.

That honor goes to fermentation, which is still a relatively unstudied scientific field.

“Fermented foods contain probiotic microorganisms that benefit human health in many ways. Lactic acid bacteria, a common group of microbes found within fermented vegetables, improve immune function and inhibit the growth of harmful bacteria within the body,” said Ana Maria Moise, a licensed nutritionist at The Nutrition Center in Northampton and author of “The Gut Microbiome: Exploring the Connection between Microbes, Diet, and Health.”

In order to get those benefits, though, Moise noted the foods must be raw and unpasteurized before fermenting to ensure the cultured microbes are still alive.

At a biological level, the healthy bacteria contained in fermented vegetables multiply and colonize the gut’s existing bacteria, crowding out any harmful bacteria and staving off diseases (and colds) before they happen, says Addie Rose Holland, co-founder of Greenfield-based Real Pickles, which sells naturally fermented vegetables throughout the northeast.

Over time, healthy bacteria that’s already on the vegetable breaks down some of the vegetable’s sugars into lactic acid, which acts as a natural preservative.

If raw vegetables are left to sit in a barrel without oxygen for about 8 months to a year, “in a lot of cases, the fermented version of the vegetable is more nutritious than the raw version,” said Holland, 39, noting they also add salt — which kills certain types of bacteria that can inhibit fermentation; gets the process started faster; and adds flavor.

Holland said that scientific studies have shown there’s more vitamin C in fermented cabbage than in raw cabbage.

“Through (the bacteria’s) processing of the fresh vegetable, they’re creating compounds and nutrients and enzymes that our body doesn’t produce on its own,” Holland said.

While there are supplements that can deliver specific strains of healthy bacteria, fermented foods — which also include products like yogurt, vinegar, hard cider, and craft beer — can be better because “if you’re eating fermented foods you’re getting huge diversity,” Holland said. And that’s on top of the nutrients raw vegetables already contain.

Additionally, although it’s known that healthy bacteria is good for health, Holland said scientists haven’t identified which bacterial strains are the best for gut health, or how to enhance those strains in fermented foods.

“We know that microbiomes are important,” Holland said. “There’s still this huge gap in scientific understanding as to why probiotics are good for health.”

At least in part, Holland suggested that the research gap stems from the fact that fermented foods fell out of favor in America in recent decades and were replaced by vinegar pickles — which are preserved with boiled vinegar and salt and don’t have to be refrigerated. But even though vinegar pickles might be easier to stock, they don’t have the same health benefits because they’re not fermented, she said.

“Fermented pickles are the traditional way of making pickles, and it’s a process that’s been used for thousands of years. The builders of the great wall in China were eating fermented pickles. The Romans ate sauerkraut,” she said. “It’s a food that spans cultures all across the world, and is a really important part of traditional healthy diets.”

More recently, as people have realized the health benefits of fermented foods, Holland says they’re enjoying a resurgence.

When she and husband Dan Rosenberg, 42, started Real Pickles in 2001, Holland said they were one of only a handful of businesses nationwide producing fermented pickles. Rosenberg, who discovered fermenting at a farming conference at Hampshire College, and Holland, who also works at the North East Climate Science Center at the University of Massachusetts Amherst, both have degrees in geology.

These days, Holland estimated there are “dozens (of fermented vegetable businesses) for sure, if not over a hundred.”

Each year, Holland says they process about 300,000 pounds of organic vegetables from area farms like Atlas Farm, Red Fire Farm, Chamutka Farm, Kitchen Garden Farm. Holland noted they buy their products from farms that don’t use harmful chemicals because they believe a better vegetable makes for a better, more healthful, fermented veggie.

These days, their products — fermented beets, cucumbers, cabbage — are sold in supermarkets including Whole Foods and Big Y across New England, and in New York, New Jersey, and Pennsylvania.

“There were a few years when we were still one of the only businesses doing this, and it was really hard for us to keep up with the demand,” she said, noting they’ve intentionally kept their business small, and recently converted it into a worker-owned coop.

That cultural renaissance is transitioning into renewed scientific interest. Locally, the nature of bacteria and microbes in fermented vegetables was the focus of a recent study by researchers at the University of Massachusetts Amherst.

“We were interested in fermented foods and beverages in general … Is there a risk for disease causing bugs (in fermented foods)? How can we predict product outcomes?” said David Sela, assistant professor of food science at the University of Massachusetts Amherst. Sela facilitated the study along with undergraduate student Jonah Einson and research fellow Asha Rani, and others from the U.S. Food and Drug Administration’s Center for Food Safety and Applied Nutrition.

The study, which was conducted at Real Pickles and took about a year and a half to perform, looked at microbiome communities in the Greenfield facility. The researchers also collected data on the vegetable’s microbes at specific times during the fermentation process. Sela said they found a distinct difference in microbiome communities between the area where raw food is processed and the fermenting room.

While this wasn’t a surprise, Sela said the data they collected and sifted through could lead to future studies and a better understanding of how to enhance nutrition in fermented foods, and possibly decrease the amount of food that’s spoiled, among other things.

“There is much more work that needs to be done. We’re looking forward to playing our part, as small as it may be, and supporting the community that emerges,” Sela said.

For the greatest health benefits, Moise noted that most traditional diets incorporate small portions of fermented foods in every meal, along with other types of foods that are high in fiber.

“I encourage my patients to incorporate complex carbohydrates such as legumes and beans, cooked whole grains, as well as non-starchy vegetables like asparagus, onions, garlic, leeks, dandelion greens, all of which contain prebiotic fiber that feed probiotic bacteria,” she said.

Looking ahead, in future studies, Holland says she’s hoping that scientists can quantify the impact that organic farming methods have been sprayed by chemicals, have on the final fermented product.

“We think it’s very important the vegetables coming from the farm are rich in diversity, microbally, which means that it’s really important that they’re coming from organic farms that aren’t using herbicides, pesticides, things that might kill that microbial diversity,” Holland said. “It’s intuitive for us that buying healthy vegetables makes for a healthier product. But scientific documentation of that would be amazing.”