SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the -p parameter, which is documented as:
-p
-p, --parents no error if existing, make parent directories as needed
-p, --parents
no error if existing, make parent directories as needed
So:
mkdir -p "$BACKUP_DIR/$client/$year/$month/$day"