Present a leading zero before the month:
YYYY-0MM-DD
Both YYYY-MM-DD and YYYY-DD-MM are used by people and can be confusing in the beginning of the month.
Don't Repeat Yourself
Set a variable for the full path to the source file.
Create the backup path by appending an extension from `date` output.
Also fixed quoting and switched to an `if` block.
Clean up block level variables.