I use defaults so a script works without any setup and can still be tuned from the environment.
backup_dir=${BACKUP_DIR:-/var/backups}
: "${RETRIES:=3}"
echo "$backup_dir $RETRIES"
${var:-word} expands to word when the variable is unset or empty and leaves the variable alone. ${var:=word} also assigns it. The leading : is a no-op command that lets you run the assignment without executing the value. Leave out the colon, as in ${var-word}, and an empty but set variable counts as set.
Further reading: Bash manual: Shell Parameter Expansion