I think if you do a System Transfer the save should still be there in the N3DS, but remember that Gateway doesn't support N3DS yet, if you do a System Transfer you will lose your .cia games. (And the ability to use Gateway of course).
But anyways, to answer your question, use SaveDataFiler to extract your Pokemon save, there should be plenty of tutorials of how to use SaveDataFiler in the Tutorial board. Also keep in mind that Pokemon will reject any save backup that is not the last one played unless you delete the secure value (which is a feature in SaveDataFiler).