<commit_before># Backup NGINX configuration & Database & Webroot

function ee_mod_site_backup()
{
		# Backup directory setup
		local ee_webroot=$(grep root /etc/nginx/sites-available/$EE_DOMAIN | awk '{ print $2 }' | sed 's/;//g' | sed 's/\/htdocs//')
		if [ ! -d $ee_webroot/backup ] || [ ! -d $ee_webroot/backup/htdocs ] || [ ! -d $ee_webroot/backup/nginx ] || [ ! -d $ee_webroot/backup/db ]; then
			mkdir -p 	$ee_webroot/backup/{htdocs,nginx,db} || ee_lib_error "Unable to create $ee_webroot/backup directory, exit status =" $?
		fi

		# Move htdocs
		if [ "$EE_SITE_CURRENT_OPTION" = "HTML" ] || [ "$EE_SITE_CURRENT_OPTION" = "MYSQL" ] || [ "$EE_SITE_CURRENT_OPTION" = "PHP" ]; then
			mv $ee_webroot/htdocs $ee_webroot/backup/htdocs/htdocs-$(date +"%m-%d-%y:") || ee_lib_error "Unable to create $ee_webroot/htdocs backup, exit status =" $?
			mkdir -p $ee_webroot/htdocs
		fi

		# Backup $EE_DOMAIN NGINX configuration
		cp -av /etc/nginx/sites-available/$EE_DOMAIN $ee_webroot/backup/nginx/${EE_DOMAIN}-$(date +"%m-%d-%y").conf.bak

		# Database backup
		if [ -f $(grep root /etc/nginx/sites-available/$EE_DOMAIN | awk '{ print $2 }' | sed 's/;//g' | sed 's/htdocs/*-config.php/') ]; then
			local ee_db_name=$(grep DB_NAME $(grep root /etc/nginx/sites-available/$EE_DOMAIN | awk '{ print $2 }' | sed 's/;//g' | sed 's/htdocs/*-config.php/' 2> /dev/null) | cut -d"'" -f4)
			mysqldump $ee_db_name > $ee_webroot/backup/db/${ee_db_name}-$(date +"%m-%d-%y").sql.bak
		fi
}
<commit_msg>date format updated and output to log file<commit_after># Backup NGINX configuration & Database & Webroot

function ee_mod_site_backup()
{
		# Backup directory setup
		local ee_webroot=$(grep root /etc/nginx/sites-available/$EE_DOMAIN | awk '{ print $2 }' | sed 's/;//g' | sed 's/\/htdocs//')
		if [ ! -d $ee_webroot/backup ] || [ ! -d $ee_webroot/backup/htdocs ] || [ ! -d $ee_webroot/backup/nginx ] || [ ! -d $ee_webroot/backup/db ]; then
			mkdir -p 	$ee_webroot/backup/{htdocs,nginx,db} || ee_lib_error "Unable to create $ee_webroot/backup directory, exit status =" $?
		fi

		# Move htdocs
		if [ "$EE_SITE_CURRENT_OPTION" = "HTML" ] || [ "$EE_SITE_CURRENT_OPTION" = "MYSQL" ] || [ "$EE_SITE_CURRENT_OPTION" = "PHP" ]; then
			mv $ee_webroot/htdocs $ee_webroot/backup/htdocs/htdocs-$(date +"%m-%d-%y::%T") || ee_lib_error "Unable to create $ee_webroot/htdocs backup, exit status =" $?
			mkdir -p $ee_webroot/htdocs
		fi

		# Backup $EE_DOMAIN NGINX configuration
		cp -av /etc/nginx/sites-available/$EE_DOMAIN $ee_webroot/backup/nginx/${EE_DOMAIN}-$(date +"%m-%d-%y::%T").conf.bak &>> $EE_COMMAND_LOG

		# Database backup
		if [ -f $(grep root /etc/nginx/sites-available/$EE_DOMAIN | awk '{ print $2 }' | sed 's/;//g' | sed 's/htdocs/*-config.php/') ]; then
			local ee_db_name=$(grep DB_NAME $(grep root /etc/nginx/sites-available/$EE_DOMAIN | awk '{ print $2 }' | sed 's/;//g' | sed 's/htdocs/*-config.php/' 2> /dev/null) | cut -d"'" -f4)
			mysqldump $ee_db_name > $ee_webroot/backup/db/${ee_db_name}-$(date +"%m-%d-%y::%T").sql.bak &>> $EE_COMMAND_LOG
		fi
}

{'fraction_non_alphanumeric': 0.19424460431654678, 'fraction_numerical': 0.0032701111837802484, 'mean_word_length': 3.824921135646688, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1870953', 'n_tokens_mistral': 1306, 'n_tokens_neox': 1258, 'n_words': 243}