6 lines
169 B
Bash
6 lines
169 B
Bash
|
#!/usr/bin/bash
|
||
|
|
||
|
date=$(date +%Y-%m-%d)
|
||
|
mysqldump -utest -ptest123 sage > ~/db/sage-${date}.sql
|
||
|
find ~/db -name "*.sql" -mtime +1 -print|awk '{print("rm -f", $1)}'| sh
|