I have done this with pancake mix, my own dehydrated vegtables (I buy frozen vegtables on sale and place them righ in my dehydrator)as well as small pint jars full of spices (cinimmon, black pepper, crushed red pepper,) and then I use the Tila vacuum jag attachment and throw an ozygen absorber in to boot! I also packed crisco the same way, it should be good for years.
Nice thing about the canning jars is that they are insect and rodent proof. The lids don’t last forever, but can easily got for 7+ years before showing signs of corrosion.