forked from evolix/evocheck
check_backupuptodate: use find with --max-depth=1 to limit the number of evaluated files
This commit is contained in:
parent
271e8623b4
commit
f2f3155fc3
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Changed
|
||||
|
||||
- check_evobackup_exclude_mount : skip if --one-file-system is used, and exclude scripts without Rsync command
|
||||
- check_backupuptodate: use find with --max-depth=1 to limit the number of evaluated files
|
||||
|
||||
## [22.08] - 2022-08-04
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ check_backupuptodate(){
|
|||
backup_dir="/home/backup"
|
||||
if [ -d "${backup_dir}" ]; then
|
||||
if [ -n "$(ls -A ${backup_dir})" ]; then
|
||||
for file in "${backup_dir}"/*; do
|
||||
find "${backup_dir}" -maxdepth 1 -type f | while read -r file; do
|
||||
limit=$(($(date +"%s") - 172800))
|
||||
updated_at=$(stat -f "%m" "$file")
|
||||
|
||||
|
|
Loading…
Reference in a new issue