A shell script to help with archiving logs on your machine. It accepts log directory as argument, compresses the logs and stores them in a new directory.
Built as a learning project for DevOps Roadmap on roadmap.sh.
- Path specification via CLI arguments
- Input validation
- Automatic directory creation
- Timestamp-based naming
- Bash
git clone https://github.com/architxkumar/Log-Archive-Tool.git
cd Log-Archive-Tool
chmod u+x ./log-archive.sh
./log-archive.sh [Source-Directory] [Target-Directory]
Note
Source Directory refers to log files path. Target Directory refers to the path where the zip will be compressed
Important
All visible files inside the Source directory will be compressed
Project is licensed under MIT License