There are also ways with an app called godmode9 to backup the entire games themselves to a file you can install as a digital game on any 3DS or emulator.
@Siphonay also of note:
- even if your game doesn't work, try backing up the save witch Checkpoint or similar: it seems that only the ROM fails and not the read-write chip used for the save files
- i'm not sure it's advisable to play online with a backup of your copy of the game installed as digital, but backing it up is safe and you should definitely do it anyway
This generalist Mastodon server welcomes enthusiasts of the Pokémon franchise, to talk about it or anything else. Join the federation!