System Engineering

Mysql Backup Script

Posted on
MySQL

Features Full Backup (Mysqldump) Incremental Backup (Bin-log) Local Backup & Remote(AWS S3) Upload Sample Environments MySQL bin log prefix : mysql-bin BINLOG_PATH=/home/mysql/data BACKUP_ROOT=/home/backup/mysql S3_PATH=s3://system-backup/{SyatemName}/mysql #!/bin/bash #—————————————- # MySQL Backup Script # Revision 20160531 # Copyright (c) Aiden Kim # http://www.daemon.pe.kr #—————————————- ARCHIVE_PERIOD=60 BINLOG_PATH=/home/mysql/data BASE_PATH=/home/backup/mysql SYSNAME=$(echo $HOSTNAME | tr “[:lower:]” “[:upper:]”) S3_PATH=s3://system-backup/${SYSNAME}/mysql STATUS_PATH=${BASE_PATH}/mysql-backup-status ## prepare path if ! […]

System Engineering

Subversion Repogitories Backup Script

Posted on
Subversion

Features Full Backup (Dump) Incremental Backup (Dump) Local Backup & Remote(AWS S3) Upload Sample Environments REPOS_ROOT=/home/svn/repos BACKUP_ROOT=/home/backup/svn S3_PATH=s3://svn-backup/svn #!/bin/bash #—————————————- # Subversion Repogitories Backup Script # Revision 20160531 # Copyright (c) Aiden Kim # http://www.daemon.pe.kr #—————————————- DSTR=$(date +”%Y%m%d”) ARCHIVE_PERIOD=30 REPOS_ROOT=/home/svn/repos BACKUP_ROOT=/home/backup/svn S3_PATH=s3://svn-backup/svn # Each repogitories REPOS_DIRS=`ls -t ${REPOS_ROOT} 2>/dev/null` for DIR in ${REPOS_DIRS}; do # Create directory BACKUP_PATH=${BACKUP_ROOT}/repo-${DIR} […]