728x90 리눅스 crontab1 [LINUX] 리눅스 자동 백업 스크립트(crontab)[크론탭] autoBackupDB.sh #!/bin/bash backupPath=/home/ubuntu/backup_db/ backupDate=$(date +%Y%m%d_%H%M%S) USERNAME=root PASSWORD=******** sudo mysqldump -u$USERNAME -p$PASSWORD --all-database > $backupPath/$backupDate'_contest_backup.sql' zip -j $backupPath$backupDate'_backupDB.zip' $backupPath$backupDate'_contest_backup.sql' rm "$backupPath"*_contest_backup.sql find $backupPath* -mtime +13 -name "*backu.. Server/Linux 2018. 4. 13. 이전 1 다음 728x90