rsync-time-backup
rsync-time-backup copied to clipboard
Log file name does not match snapshot name
When creating snapshot, the name is derived from current date/time.
NOW=$(date +"%Y-%m-%d-%H%M%S")
// ...
DEST="$DEST_FOLDER/$NOW"
However, the log file name is later generated from current date
LOG_FILE="$LOG_DIR/$(date +"%Y-%m-%d-%H%M%S").log"
This has the effect that I end up having a snapshot directory with a different name than the log file (off by 1 second).
The log file name should be generated from the same date as the snapshot, i.e.
LOG_FILE="$LOG_DIR/$NOW.log"