Skip to content

Commit

Permalink
More robust detection of the most recent backup to refer to for hard …
Browse files Browse the repository at this point in the history
…links.
  • Loading branch information
MacLemon committed Feb 19, 2012
1 parent 30aa6cc commit e8c7881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlbackup
Expand Up @@ -612,7 +612,7 @@ debug "Writing my own tag to $MLdestPath/$MLbackupName.pid"
echo $$ > "$MLdestPath/$MLbackupName.pid"

# We need to find the most recent Backup as our Target for the link-dest
MLmostRecentSet=$(ls -1tw "$MLdestPath/" | grep -E "^$MLbackupName-(19|20)[0-9][0-9]\.(0[1-9]|1[012])\.(0[1-9]|[12][0-9]|3[01])-([01][0-9]|2[0-3])\.[0-5][0-9]\.[0-5][0-9]" | head -1)
MLmostRecentSet=$(ls -1tw "$MLdestPath/" | grep -E "^$MLbackupName-(19|20)[0-9][0-9]\.(0[1-9]|1[012])\.(0[1-9]|[12][0-9]|3[01])-([01][0-9]|2[0-3])\.[0-5][0-9]\.[0-5][0-9]$" | head -1)
debug "The most Recent Set to refer to is: $MLmostRecentSet"

#Fetching the current date and time
Expand Down

0 comments on commit e8c7881

Please sign in to comment.