I have the current open dog food bag, which is large and in 2 5 gallon buckets with gamma seals. Then, 2 extra bags of unopened dog food. The way it is sold it will keep for 6-12 months, there are dates on your dog food bags, so check out the sell by date, then it is good at least a few months past that, they package well already. my 3 bags total in the house are more than 3 months worth. SO, I rotate, I buy a new bag when ever I open a new bag.
If it is more than 3 or 4 months that we cant get to stores, I will start to switch off people food half and half for a bit to transition to straight people food.
Cats same way, but if they ever have to transition to non-store bought, we will need to make sure they get some milk or eggs in with their "people food"