diff --git a/playbooks/roles/gerrit/tasks/main.yaml b/playbooks/roles/gerrit/tasks/main.yaml index a200601bef..e040a572cc 100644 --- a/playbooks/roles/gerrit/tasks/main.yaml +++ b/playbooks/roles/gerrit/tasks/main.yaml @@ -309,6 +309,21 @@ minute: 17 hour: 4 +- name: Set up cron job to track upstream + cron: + name: track-upstream + job: '/usr/local/bin/track-upstream' + user: root + minute: 42 + +- name: Set up cron job to back up gerrit db + cron: + name: gerrit-backup + user: root + hour: 0 + minute: 0 + job: '/usr/bin/mysqldump --defaults-file=/root/.gerrit_db.cnf --opt --ignore-table mysql.event --all-databases --single-transaction | gzip -9 > /home/gerrit2/mysql_backups/gerrit.sql.gz' + # Gerrit rotates their own logs, but doesn't clean them out # Delete logs older than a month - name: Set up cron job to clean old gerrit logs