Cherrypick of 5de2f 06451 0364b 07ff7 a374d. Support for save and get in archive.