A user kindly pointed out that domain names that contain hyphens were not being backed up correctly. On investigation we noted that Amazon support all sorts of odd characters (in addition to the not-so-odd-hyphen) in domain names and we were not correctly applying the quoting rules that are required in such circumstances.
We have updated the code and rolled out the new version.