It was exactly a year ago, and the Ukrainian pet food maker Kormotech had concluded its annual meeting. The mood was buoyant. Business was booming, the factory was running 24/7, and sales were projected to grow by double digits. “We had a beautiful budget,” Rostyslav Vovk, the company’s chief executive and founder, recalled almost dreamily.The next morning, air sirens sounded.Russia had invaded. Mr. Vovk called his top managers to meet at a nearby hotel, avoiding the company’s windowed seventh-floor headquarters in Lviv. They had a plan for what had been considered a very unlikely risk — Russian aggression — but it soon proved wholly inadequate.“We were not ready,” Mr. Vovk said. He closed the plant. Raw materials couldn’t get into the country, and deliveries headed abroad couldn’t get out. Staff from the besieged eastern part of the country needed to be evacuated. Employees were joining the military. And the company’s biggest export market, Belarus, was a close ally of Vladimir V. Putin, the Russian president.“We would make decisions,” Mr. Vovk said of that first week after the invasion, “and then the next morning, we would change all the information.”Like leaders at tens of thousands of companies throughout Ukraine, Mr. Vovk and his team were suddenly confronted with a new and bewildering responsibility: keeping a business going through the chaos and danger of war.For many, the task has proved impossible. Before the war, Ukraine’s private sector, including its huge steel and agricultural industries, accounted for 70 percent of the country’s gross domestic product, said Elena Voloshina, head of the International Finance Corporation in Ukraine. Eighty-three percent of businesses experienced losses related to the war, she said. Forty percent suffered direct damage, like a factory or store decimated by a missile, while 25 percent were in what is now occupied territory.Kormotech employs 1,300 people, some of whom had to be evacuated from the eastern part of Ukraine.Maciek Nabrdalik for The New York TimesLast year, Ukraine’s overall output plunged by nearly a third, wrecking the country’s economy and hampering its ability to battle Russian forces.Kormotech, a family-owned business with 1,300 employees worldwide, does not produce weapons or drones. It isn’t involved in supplying critically needed electricity, transport or fresh water to ravaged cities. But it employs people, produces income, earns foreign currency from exports, and contributes tax revenue that the government in Kyiv desperately needs to pay soldiers, repair power lines and buy medical equipment.A year later, Mr. Vovk and his management team have found reason to again celebrate. Mr. Vovk was back in his offices getting ready for the latest annual meeting with his staff — and some of their dogs, which are fixtures around the office and often serve as product taste testers. Despite the odds, business grew more than expected.The State of the WarBiden’s Kyiv Visit: President Biden traveled covertly to the besieged Ukrainian capital, hoping to demonstrate American resolve and boost shellshocked Ukrainians. But the trip was also the first of several direct challenges to President Vladimir V. Putin of Russia.Contrasting Narratives: In sharply opposed speeches, Mr. Biden said Mr. Putin bore sole responsibility for the war, while Mr. Putin said Russia had invaded in self-defense. But they agreed the war would not end soon.Nuclear Treaty: Mr. Putin announced that Russia would suspend its participation in the New START nuclear arms control treaty — the last major such agreement remaining with the United States.In the North: A different sort of war game is playing out in northern Ukraine, where Russian shelling is tying up thousands of Ukrainian troops that might otherwise defend against attacks farther south.Kormotech had a few things going for it. The company’s plant was outside Lviv in the westernmost part of the country, near the Polish border, one of the safest parts of Ukraine. The two factories in Prylbychi were able to reopen less than two weeks after the war began.An earlier decision to start an additional factory in Lithuania, which opened in 2020 and was operating around the clock, turned out to be a boon. It could continue smoothly producing and delivering tons of Kormotech’s Club 4 Paws, Optimeal, Miau and Gav brands.After a helter-skelter start, Mr. Vovk and his top managers reorganized. The company, which sells its products in 35 countries including the United States and Europe, had a little wiggle room because they had avoided just-in-time practices that eliminated backup inventory — a cost-cutting approach that had stymied so many companies worldwide during the pandemic. Kormotech routinely kept stock in its warehouses — at least a month and a half’s worth in Ukraine, two months in other countries in Europe and two and a half in the United States.Kormotech was able to recover from supply chain turmoil in part because it had routinely stocked its warehouses with up to two months of ingredients for its pet food.Maciek Nabrdalik for The New York TimesStill, Kormotech’s supply chain was disrupted. Before the war, roughly half its raw materials, like meat and chicken meal, came from abroad. Now border crossing delays and rising import prices had prompted a search for domestic producers. It found two that had never produced pet meal before and taught them what to do.Kateryna Kovaliuk, Kormotech’s chief reputation officer, emphasized that pet food standards could often be more exacting than food produced for people. During a recent tour of the Lviv plant, she picked up a few kibble-size bits chopped up from long ropelike strands of cat food fresh off the production line.“Try it,” she urged, before popping a couple of pieces in her mouth and smiling. “It’s good. It tastes like meat without salt.”As it turned out, the local producers, less than 40 miles from the plant, were not only cheaper but also didn’t have to be paid in precious foreign currency. Instead of buying 500 tons of meal from abroad, the company now buys 100 tons.Kormotech stepped up its purchase of Ukrainian grains and corn as well. The war and Russian blockade caused a drastic drop in grain exports, spiraling food prices and a global hunger crisis. But it also meant that domestic businesses like Kormotech could buy at a discount.Manufacturing the product was one hurdle; getting it delivered abroad was another. At a time when Ukraine has barred men under 60 from leaving the country, the trade ministry provided exemptions for delivery drivers.“We would make decisions, and then the next morning, we would change all the information,” Rostyslav Vovk, the chief executive of Kormotech, said of the first week after the invasion.Maciek Nabrdalik for The New York TimesBut the wait at the borders could extend from a few days to a few weeks. And with seaports mostly blocked, exporting remained an expensive and tricky problem.“No one knew where to go or how,” Mr. Vovk said. The first truck sent to Azerbaijan, he said, cost more than $8,000 — before the war, it was roughly $2,000.Domestic demand for its products stayed steady, but finding new export markets was another challenge. Belarus, which has allowed Russia to stage attacks from inside its border, represented 25 percent of Kormotech’s export market. The management team decided to pull out but needed to replace those customers.Supermarket chains, particularly in the Baltic countries and Poland, were eager to step in and replace Russian-made goods with Ukrainian ones.“For the first time in my life, ‘Made in Ukraine’ was a premium,” Mr. Vovk said. Previously, when the company appeared at international pet supply exhibitions, he said with a laugh, people were so unfamiliar with the country’s products, they would ask if the letters “u” and “k” referred to “the U.K.,” for the United Kingdom.Even so, good will extended only so far. Buyers wanted assurances that Kormotech’s products would keep flowing. So the company provided guarantees, setting up a warehouse in Poland with backup stocks of its 650 different products, outsourcing some production to facilities in Germany and Poland, and drawing up last-resort plans to move production out of Ukraine.The enormous growth in both the European and American markets means that the company’s sales are expected to increase to $155 million this year from $124 million. The main obstacle to expanding even more is capacity.Its growth in Europe and the United States is expected to propel Kormotech to a big revenue increase in 2023, an unlikely development after a year of war.Maciek Nabrdalik for The New York TimesKormotech scrapped plans for a new 92 million-euro factory because of uncertainty and the difficulty in getting financing. But it invested €5 million ($5.34 million) in the Prylbychi plant and €7 million ($7.5 million) in Lithuania.Of course, many businesses have not been as successful as Kormotech, either because their facilities were damaged or demand for their products was eviscerated when people fled the country, as well as by ravenous inflation and shrunken incomes. Mr. Vovk said the exodus of millions of mothers and children had left a friend’s diaper manufacturing business in tatters.A new report from the American Chamber of Commerce in Ukraine and McKinsey & Company found that only 15 percent of companies grew last year, while nearly half saw a decline in sales.Others have adapted by relocating to places like Lviv, or changing their output to fill new wartime demands, like the lingerie seamstresses who have switched to sewing cloth vests to fit body armor plates. Ukraine’s large and mobile information technology sector has also remained strong.Businesses are still struggling to adapt. Russian attacks on Ukraine’s power grids compelled Kormotech to buy two generators at €150,000 apiece, supersize versions of the small colorful units that noisily hum outside nearly every shop and cafe on Lviv’s streets.Now, the Russians are stepping up missile strikes. On a recent weekday, air raid alerts caused 200 plant workers to spend more than half of their 12-hour shift in a tunnel-like storage area about three paces wide that doubles as a bomb shelter.Vira Protsyk, who normally would be packing boxes, sat on one of the wooden benches that lined the 100-foot-long wall. “It’s a bit boring,” she said of the forced breaks. This was the second alert of the day. “I didn’t want to go to the shelter. I’d rather work.”Russia has stepped up its missile strikes, and on a recent weekday, plant workers had to seek safety in a storage area.Maciek Nabrdalik for The New York TimesYurii Shyvala contributed reporting. More