Just in case you did not: you also need to save the OTAA network settings, such as typically the RX2 configuration. And when using ADR, you might also want to store the data rate and transmission power. See also OTAA best practice: how to not join every time? for some more.
2 Likes