fix: rm commands
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
Package: autobackup
|
||||
Version: 1.1
|
||||
Version: 1.2
|
||||
Architecture: all
|
||||
Maintainer: zankia <admin@zankia.fr>
|
||||
Description: automatically backup directories on a regular basis
|
||||
|
||||
@@ -33,7 +33,7 @@ while IFS= read -r SOURCE; do
|
||||
rsync --archive --relative --link-dest="$BACKUP_DIR/previous" "$SOURCE" "$BACKUP_DIR/backup_$DATE"
|
||||
done <"$SOURCE_LIST_FILE"
|
||||
|
||||
rm "$BACKUP_DIR/previous"
|
||||
rm -f "$BACKUP_DIR/previous"
|
||||
ln -s "backup_$DATE" "$BACKUP_DIR/previous"
|
||||
|
||||
find "$BACKUP_DIR" -maxdepth 1 -type d -mtime "+$RETENTION_DAYS" -exec rm -r {} \;
|
||||
|
||||
Reference in New Issue
Block a user