Handle clean up in a different way
This commit is contained in:
parent
18578817f1
commit
4963afd5f6
|
@ -11,8 +11,6 @@ bucket="db-backups-multinode"
|
||||||
mirror="common-<%= @environment %>-mirror"
|
mirror="common-<%= @environment %>-mirror"
|
||||||
echo "Backing up all databases for for multinode customer"
|
echo "Backing up all databases for for multinode customer"
|
||||||
ssh "${backup}" "sudo /home/script/bin/backup_multinode_db.sh"
|
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"
|
echo "Copying backups here"
|
||||||
mkdir -p ${backup_dir}
|
mkdir -p ${backup_dir}
|
||||||
scp "script@${backup}:${remote_backup_dir}/mariadb-dump*.sql.gz" "${backup_dir}"
|
scp "script@${backup}:${remote_backup_dir}/mariadb-dump*.sql.gz" "${backup_dir}"
|
||||||
|
|
|
@ -3,3 +3,4 @@ docker exec mariadb_db_1 /scripts/run_manual_backup_dump.sh
|
||||||
backupdir=/etc/mariadb/backups
|
backupdir=/etc/mariadb/backups
|
||||||
chmod 755 ${backupdir}
|
chmod 755 ${backupdir}
|
||||||
chown -R script:root ${backupdir}
|
chown -R script:root ${backupdir}
|
||||||
|
find /etc/mariadb/backups/ -mtime +1 -delete
|
||||||
|
|
Loading…
Reference in a new issue