Ignore directories of users who don't have anything to back up
This commit is contained in:
parent
2b8cf96cfe
commit
19908fea0b
@ -36,6 +36,7 @@ fi
|
||||
# WE MAKE BACKUP NOW SERGEI
|
||||
for dir in /home/*; do
|
||||
username="$(basename -- "$dir")"
|
||||
[ -d "$dir/.backup" ] || continue
|
||||
tar czhf "$OUTDIR/desktop-$username-{{ inventory_hostname }}-$(date -Iseconds).tar.gz" "$dir/.backup/"*
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user