It very much depends on your OWN countries interpretations of copyright law. Remember that not everyone in the world lives under the draconian rules of the United States.
Nintendo can put whatever they like about roms being illegal on their website/game manuals, etc.. but, Nintendo aren't law.
Rom images are illegal in the US, I believe, when they change the format. ie, from cartridge to a file on your HDD. However, I think there is some scope for it if you're backing up to cartridge to play on the original, intended device. There are then other principles, such as it must be a byte for byte duplicate of the original.. etc...
At the end of the day, it's imposisble to debate fully on something which is so much of a grey area. There is no court case to refer to, regarding backup games in any country that I know of. Prosecution under the law is zero. It has not happened and is probably not likely to happen any time soon. For private, personal use, a backed up copy is not going to raise any eyebrows.
If like me, you're a filthy rom hoarding bastard (or simply are interested in games preservation), then you still have nothing at all to fear from the laws of your lands, so long as you don't enter into making it a commercial venture. ie.. Don't try and make monetry profit!!!!....
So, is it legal? Probably not, but nobody has ever been in any trouble, anywhere, for this. If you want to stay legal, forget about backups, forget about anything except for PD software, which by the way, is illegal still on platforms like GBA, because the software requires an illegal rom header for the GBA to recognise it heh