#!/bin/bash
# S3バケット名
BUCKET_NAME="your-bucket-name"
# ログファイルのパス
LOG_FILE="/var/log/syslog"
# S3にログファイルをアップロード
aws s3 cp $LOG_FILE s3://$BUCKET_NAME/$(date +%Y-%m-%d-%H%M%S)-syslog
echo "Log file uploaded to S3."
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme