log-file-rotation

Archive log files with timestamps and compression on daily, weekly, or monthly schedules.

15|8|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/AstorYH/PASB --skill log-file-rotation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: log-file-rotation
Source: https://github.com/AstorYH/PASB/tree/main/nanobot/skills/log-file-rotation
Command: npx skills add https://github.com/AstorYH/PASB --skill log-file-rotation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents disk space from being filled by old log data by automatically archiving and managing log files.

Core Features & Use Cases

  • Automated Archiving: Periodically archives current log files with timestamps and compression.
  • New File Creation: Creates new, empty log files to continue logging.
  • Configurable Rotation: Supports daily, weekly, or monthly rotation schedules.
  • Optional Retention: Can automatically delete old archived logs to save space.
  • Use Case: Ensure your server's /var/log directory doesn't fill up by automatically rotating and archiving application logs daily, keeping only the last 30 days of archives.

Quick Start

Configure the log-file-rotation skill to rotate the log files located at /var/log/app.log and /var/log/system.log daily, storing archives in /var/log/archive and retaining them for 30 days.

Frequently Asked Questions about log-file-rotation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate log rotation to prevent disk space exhaustion on my server?

Automated log rotation prevents disk space exhaustion by archiving existing log files with timestamps and compression, creating new empty files, and optionally enforcing a retention policy to delete old archives.

What is the best way to archive application logs daily and keep only the last 30 days?

Daily log archiving with retention is achieved by configuring a daily rotation frequency that compresses current logs into an archive directory and automatically deletes archives older than the specified 30-day retention period.

Can I configure log rotation to run on a weekly or monthly schedule instead of daily?

Yes, log rotation schedules are fully configurable and support daily, weekly, or monthly rotation frequencies to match your specific system maintenance and archiving requirements.

Do I need to specify archive directories and log file paths for log rotation to work?

Yes, log rotation requires configurable paths for both the source log files and the target archive directories to correctly move, compress, and retain the archived log data.

How does automated log archiving handle existing log files when a rotation triggers?

Automated log archiving handles existing files by renaming them with timestamps, applying compression, moving them to the archive directory, and immediately creating new empty log files for continuous logging.