๋ฐ์ํ ์คํฌ๋ฆฝํธ1 [Linux] MySQL DB ๋ฐฑ์ ์คํฌ๋ฆฝํธ - ์๋์ผ๋ก ๋ฐฑ์ ํ๊ธฐ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ๋ฐ์ดํฐ๋ฅผ ์๋์ผ๋ก ๋ฐฑ์ ํ ์ ์๋๋ก ์คํฌ๋ฆฝํธ๋ฅผ ์์ฑํ๋ค. #! /bin/bash # backup directory dir=$(echo /home1/test01/project01/db/backup) # get backup file time and now time customer_BackupFileDate=$(date -r $dir/backup_customer.sql '+%Y-%m-%d %H:%M:%S') customer_BackupFileDateString=$(date -r $dir/backup_customer.sql '+%Y%m%d_%H%M%S') # rename last backup file mv $dir/backup_customer.sql $dir/backup_customer_$cust.. 2021. 12. 17. ์ด์ 1 ๋ค์ 728x90 ๋ฐ์ํ