I've stored ham in the freezer for 8 months and it was still good.
If you freeze ham it should be good for up to 8 months or might still be good after a year. Ham lasts a long time in a freezer and so does other meats.
If you want to keep things longer even potatoes it's recommended you freeze them.
Keeping potatoes in the freezer will also make them last longer.