diff --git a/sonar-ec2-bash-scripts/ays-sonarqube-backup.sh b/sonar-ec2-bash-scripts/ays-sonarqube-backup.sh index 0473db4..a40917b 100644 --- a/sonar-ec2-bash-scripts/ays-sonarqube-backup.sh +++ b/sonar-ec2-bash-scripts/ays-sonarqube-backup.sh @@ -3,7 +3,7 @@ # Variables DIR_TO_BACKUP="" BUCKET_NAME="" -DATE=$(date +%Y%m%d%H%M) +DATE=$(date +%Y-%m-%d-%H-%M) ZIP_NAME="$(basename "$DIR_TO_BACKUP")-backup-$DATE.zip" HOME_DIR="/home/$(whoami)" ZIP_PATH="$HOME_DIR/$ZIP_NAME" diff --git a/sonar-ec2-bash-scripts/save-container-logs.sh b/sonar-ec2-bash-scripts/save-container-logs.sh index 566c441..5200663 100644 --- a/sonar-ec2-bash-scripts/save-container-logs.sh +++ b/sonar-ec2-bash-scripts/save-container-logs.sh @@ -5,7 +5,7 @@ CONTAINERS=("" "" "") LOG_DIR="" BUCKET_NAME="" S3_PATH="" # Path within the bucket for log storage -DATE=$(date +%Y%m%d%H%M) +DATE=$(date +%Y-%m-%d-%H-%M) # Ensure the log directory exists mkdir -p "$LOG_DIR" diff --git a/sonar-ec2-bash-scripts/upload-log-to-s3.sh b/sonar-ec2-bash-scripts/upload-log-to-s3.sh index ab13555..d108ddd 100644 --- a/sonar-ec2-bash-scripts/upload-log-to-s3.sh +++ b/sonar-ec2-bash-scripts/upload-log-to-s3.sh @@ -3,7 +3,7 @@ # Define variables LOG_FILE="/home/$(whoami)/ays-sonarqube-backup.sh.log" BUCKET_NAME="" -DATE=$(date +%Y%m%d%H%M) +DATE=$(date +%Y-%m-%d-%H-%M) LOG_FILE_NAME="sonarqube-backup-$DATE-log" # Upload the log file to S3 with the new name