Exclusively internal, it seems. If the data is on an SD card and the console is factory reset, the SD card auto-formats. I don't think I had an SD card, though.
Apparently the only current backup method is to manually backup from one Switch to another, which is fucking stupid.