summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2016-04-15 19:13:48 +0200
committerThomas Lange <code@nerdmind.de>2016-04-15 19:13:48 +0200
commit33740bc3e49514bbb4abe926957cc805c958f09c (patch)
tree0ac5e175b3ee2f445e6378dd536ab2f1f5f10401
parented797cbf4880cf5eed4860fa59d6e2c5d3b2deb3 (diff)
downloadsnippets-33740bc3e49514bbb4abe926957cc805c958f09c.tar.gz
snippets-33740bc3e49514bbb4abe926957cc805c958f09c.tar.xz
snippets-33740bc3e49514bbb4abe926957cc805c958f09c.zip
Bugfix: Added -maxdepth parameter
-rwxr-xr-x[-rw-r--r--]Bash/mysql-database-backup.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/Bash/mysql-database-backup.sh b/Bash/mysql-database-backup.sh
index 0bb16cf..660c80d 100644..100755
--- a/Bash/mysql-database-backup.sh
+++ b/Bash/mysql-database-backup.sh
@@ -25,7 +25,7 @@ DIRECTORY_FILE="${DIRECTORY_ROOT}${DIRECTORY_PATH}%s.sql.bz2"
#===============================================================================
# Delete old backups in backup root directory
#===============================================================================
-find "${DIRECTORY_ROOT}" -type d -mtime +30 -exec rm --recursive {} \;
+find "${DIRECTORY_ROOT}"* -maxdepth 0 -type d -mtime +30 -exec rm --recursive {} \;
#===============================================================================
# Create backup path directory if not exists