Automated gogs backups via script

Is there a way to automate gogs backup via a script and keep a weeks worth of daily backups?

thank you!