I configured Ola's scripts on a staging AG configuration to test out the logic. When I checked the backup folder today after a week, I see that the backups are happening both on the primary replica and copy_only backups on the secondary replica.
It is my understanding that the backups are supposed to happen on the secondary replica - And I have configured the AG to "Prefer secondary". I don't want the backups happening on both primary and secondary on this 2 node AG. What can be done for this to work? Please advise.