6 lines
169 B
Bash
Executable File
6 lines
169 B
Bash
Executable File
#!/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
|