you should backup principal, you can use either Olas scripts, maintenance plans or write your own.
Set up a backup solution of your choice on both servers and make sure it will only perform a log backup when the mirroring role is 'PRINCIPAL'
I usually use something like this in my sql agent jobs:
DECLARE @Mirror TINYINT;
SELECT @Mirror = mirroring_role
WHERE DB_NAME(database_id) = N'DBName'
IF (@Mirror = 1 OR @Mirror IS NULL)
PRINT 'Your Code';