If you need to preserve food for a long time, you have a few main options. If you’re going on a long space journey, I recommend canned food. If you’re backpacking, I recommend dried food to reconstitute on the road (make sure you find potable water!). If you’re at home, try freezing your food.
A few freezing tips are available from your local (or not so local) agricultural extension office (North Dakota), (Ohio), food conglomerate, or bridge club (huh?).
You can also try preserving in fat or pickling if you have dodgy electricity.