cooked corned beef, "potted meats". preservation
Traditionally, meats preserved in this fashion were cooked with lots of fat, then the entire dish was cooled quickly to allow the fat to rise to the top and solidify, creating a seal that kept out pathogens.  The entire dish, pot and all were then buried in a hole in the yard.

Although it is certainly possible to do something similar today, I would recommend instead following modern food preparation practices.  Cook in small batches that are cooled in the fridge (small batches to allow the dish to chill quickly and not overwhelming the fridge's cooling ability).  Then keep the dish in the fridge.

In the end, this means keeping the dish in the fridge and not in a hole in the yard, which in my mind takes away a lot of the appeal of this method.  However, modern practice helps prevent food poisoning, so there's that.