Right now to recover from a backup with an encrypted HD wallet the user must do something like unlock the wallet with a really long time out and manually trigger a rescan,  otherwise they risk missing some keys when auto-topup cannot run.
for (const auto& [desc_str, creation_time]  data->solvable_descs) {
                // Parse the 
                FlatSigningProvider keys;
                stdstring parse_err;
                stdunique_ptr<Descriptor> desc = Parse(desc_str, keys, parse_err, /* require_c
                assert(desc); // It should
                assert(!desc->IsRange()); // It should
                // Add to th
                WalletDescriptor w_desc(stdmove(desc), creation_time, 0, 0, 0);
                data->solvable_->AddWalletDescriptor(w_desc, keys, "", 
            }
            // Add the w
            UpdateWalletSetting(*context.chain, _name, /*load_on_stgs);
        }
    }
    // Add the s to , remove LegacyScriptPubKeyMan, and cleanup txs and address book data
    if (!.ApplyMigrationData(*data, error)) {
        return false;
    }
    return true;
}
utilResult<MigrationResult> MigrateLegacyToDescriptor(stdshared_ptr<CWallet>&& , WalletContext& context)
{
    // Before anything else, check if there is something to migrate.
    if (!->GetLegacyScriptPubKeyMan()) {
        return utilError{_("Error This  is already a  ")};
    }
    MigrationResult res;
    bilingual_str error;
    stdvector<bilingual_str> warnings;