Backup Strategy

I am trying to create a backup strategy for my website. We are running the latest version of MariaDB and my plan was to use cron job every night to run a shell script that would run the backup using innobackupex wrapper. Then I would have the backups in my backup directory and I would also have another cron job that ran once a week that would export the backups to an off site server.

My first question is should I prepare these before they are sent out to the offsite server or should I prepare them on the external server? Second I would also only want to keep a weeks worth of backups is there any easy to remove old backups using a Shell script?

It’s better to prepare backup on server where you backed up and where you are storing your backup. This will make your restore time on off site server fast too.
For other question to keep last specific no. of backups, I believe you can store all those backup stats in database table. For example, you can store restore backup successful or not information in database table and on basis of that you can remove old backups. You can use unix “find” command from your script to remove backups older then a week for instance.