I have an AlwaysOn AG system in place between two servers. Server A hosts the primary replica, Server B hosts the secondary replica.
Are there any differences if my Full & Transaction Log Backups are stored on Server A vs Server B?
Are there any differences if my backup retention maintenance plan and job is ran on Server A vs Server B (regardless of where the backups live)?
My current setup is Server A has a SQL Agent job that runs a maintenance plan on Server B to back up my databases to Server B. In that same job on Server A there's a subsequent step that runs a maintenance plan on Server A that cleans up old backups from Server B.
sys.fn_hadr_is_primary_replica('dbname')
to check for primary status in the first step of the job and exit or continue accordingly. Ola's backup job will run transaction log backups based on the AG backup preference setting. Third-party backups typically use the AG backup preference as well.