aktualisiert

This commit is contained in:
2019-10-18 21:23:53 +02:00
parent 3731b1551b
commit 94a997cd5d
33 changed files with 6915 additions and 897 deletions

8
bakdb
View File

@@ -1,5 +1,11 @@
# !/bin/sh
db=$1
pw=$2
file=/dat/bak/db/${db}_`date +"%Y%m%d"`.sqlbak
bakdir=/dat/bak/db
file=$bakdir/${db}_`date +"%Y%m%d"`.sqlbak
mysqldump --lock-tables --user root -p"$pw" $db > $file
find $bakdir -size 0 -exec rm {} \;
ls -1tr $bakdir/${db}_* | head -n -5 | xargs -d '\n' rm -f --
#find /dat/bak/db -name "${db}_*" -mtime +5 -exec rm {} \;