Handle clean up in a different way

This commit is contained in:
Micke Nordin 2023-03-13 16:33:51 +01:00
parent 18578817f1
commit 4963afd5f6
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257
2 changed files with 1 additions and 2 deletions

View file

@ -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}"

View file

@ -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