mirror of
https://github.com/laurent22/rsync-time-backup
synced 2024-11-10 14:14:16 +00:00
Drop BACKUP_FOLDER_PATTERN since it's now only used in one place.
This commit is contained in:
parent
19446c24b9
commit
584e3a9b4b
1 changed files with 2 additions and 2 deletions
|
@ -32,11 +32,12 @@ trap 'fn_terminate_script' SIGINT
|
|||
# -----------------------------------------------------------------------------
|
||||
|
||||
fn_parse_date() {
|
||||
# Converts YYYY-MM-DD-HHMMSS to YYYY-MM-DD HH:MM:SS and then to Unix Epoch.
|
||||
date -d "${1:0:10} ${1:11:2}:${1:13:2}:${1:15:2}" +%s
|
||||
}
|
||||
|
||||
fn_find_backups() {
|
||||
find "$DEST_FOLDER" -type d -name "$BACKUP_FOLDER_PATTERN" -prune
|
||||
find "$DEST_FOLDER" -type d -name "????-??-??-??????" -prune
|
||||
}
|
||||
|
||||
fn_expire_backup() {
|
||||
|
@ -92,7 +93,6 @@ fi
|
|||
# -----------------------------------------------------------------------------
|
||||
|
||||
export IFS=$'\n' # Better for handling spaces in filenames.
|
||||
BACKUP_FOLDER_PATTERN=????-??-??-??????
|
||||
NOW=$(date +"%Y-%m-%d-%H%M%S")
|
||||
PROFILE_FOLDER="$HOME/.rsync_tmbackup"
|
||||
LOG_FILE="$PROFILE_FOLDER/$NOW.log"
|
||||
|
|
Loading…
Reference in a new issue