Skip to content

brambillagabrielle/log-archive-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Log Archive Tool Project

Linux Bash AWS

About the Project

This project was proposed in the DevOps Path from roadmap.sh, with the objective of creating a tool to compress logs in a given directory, copy the tar.gz file to a bucket S3 and clean the directory, for archiving purposes.

Prerequisites

Verify if AWS-CLI is installed on your Linux terminal by running:

aws --version

Note: If AWS-CLI is not installed, refer to the Installing or updating to the latest version of the AWS CLI (AWS) documentation

Usage

To use the tool, first you need to authenticate with AWS using the command:

aws login

Next, export the S3 bucket URL (s3:// + Bucket name) as an environment variable named S3_BUCKET, as shown below:

export S3_BUCKET="s3://bucket_name"

Then you can run the command below to execute the script using sudo -E for the required permissions and to preserve the AWS session from the previous step:

sudo -E ./log-archive.sh /path/file

About

Log Archive Tool project implemented for the DevOps Roadmap, with the objective of compressing and send log data from a Linux directory to a S3 Bucket.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages