diff --git a/templates/script/backupmultinodedb.erb.sh b/templates/script/backupmultinodedb.erb.sh index 4fd97f5..79b6186 100644 --- a/templates/script/backupmultinodedb.erb.sh +++ b/templates/script/backupmultinodedb.erb.sh @@ -11,8 +11,6 @@ bucket="db-backups-multinode" mirror="common-<%= @environment %>-mirror" echo "Backing up all databases for for multinode customer" ssh "${backup}" "sudo /home/script/bin/backup_multinode_db.sh" -echo "Cleaning up old backups for ${backup}" -ssh ${backup} "sudo /home/script/bin/purge_backups.sh ${remote_backup_dir}" echo "Copying backups here" mkdir -p ${backup_dir} scp "script@${backup}:${remote_backup_dir}/mariadb-dump*.sql.gz" "${backup_dir}" diff --git a/templates/scriptreceiver/backup_multinode_db.erb.sh b/templates/scriptreceiver/backup_multinode_db.erb.sh index f52020b..17478c5 100644 --- a/templates/scriptreceiver/backup_multinode_db.erb.sh +++ b/templates/scriptreceiver/backup_multinode_db.erb.sh @@ -3,3 +3,4 @@ docker exec mariadb_db_1 /scripts/run_manual_backup_dump.sh backupdir=/etc/mariadb/backups chmod 755 ${backupdir} chown -R script:root ${backupdir} +find /etc/mariadb/backups/ -mtime +1 -delete