Hi @discholi,
if the old and new installations can live side-by-side, this workflow might already solve your problem: Replicate configuration - #5 by leo_woerteler
Otherwise, you would need to modify it to create a file with the required information, replace the AP installation, and then apply the cached information.
Best regards,
Manuel