{"id":23483570,"url":"https://github.com/badreddinkaztaoui/fq_log_archive_script","last_synced_at":"2025-04-14T00:14:36.908Z","repository":{"id":268896859,"uuid":"905792456","full_name":"badreddinkaztaoui/fq_log_archive_script","owner":"badreddinkaztaoui","description":"This script is designed to manage and maintain log files by archiving and cleaning them up based on their age. It compresses old log files into an archive and removes logs and archives older than specified retention periods.","archived":false,"fork":false,"pushed_at":"2024-12-19T14:48:00.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T00:14:28.471Z","etag":null,"topics":["bash","bash-scripting","devops","linux"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badreddinkaztaoui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-19T14:30:41.000Z","updated_at":"2024-12-19T14:53:32.000Z","dependencies_parsed_at":"2024-12-19T15:39:01.311Z","dependency_job_id":"15a08191-4d81-47b6-86b0-e5a4f1c515eb","html_url":"https://github.com/badreddinkaztaoui/fq_log_archive_script","commit_stats":null,"previous_names":["badreddinkaztaoui/fq_log_archive_script"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badreddinkaztaoui%2Ffq_log_archive_script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badreddinkaztaoui%2Ffq_log_archive_script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badreddinkaztaoui%2Ffq_log_archive_script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badreddinkaztaoui%2Ffq_log_archive_script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badreddinkaztaoui","download_url":"https://codeload.github.com/badreddinkaztaoui/fq_log_archive_script/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799955,"owners_count":21163404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bash-scripting","devops","linux"],"created_at":"2024-12-24T21:13:03.441Z","updated_at":"2025-04-14T00:14:36.869Z","avatar_url":"https://github.com/badreddinkaztaoui.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Log Archiver Script\n\nThis script is designed to manage and maintain log files by archiving and cleaning them up based on their age. It compresses old log files into an archive and removes logs and archives older than specified retention periods.\n\n## Features\n\nAutomatically compress log files older than a specified number of days.\n\nMoves the compressed archives to a specified or default directory.\n\nDeletes archived log files after archiving.\n\nCleans up archives older than a specified retention period.\n\nGenerates a log file to record the archiving process.\n\n## Usage\n\nTo run the script, use the following command:\n\n```bash\ngit clone https://github.com/badreddinkaztaoui/fq_log_archive_script\ncd fq_log_archive_script\nchmod +x log-archive.sh\n./log_archive.sh \u003clog_directory\u003e [archive_directory] [max_age_days] [retention_days]\n```\n\n## Arguments\n\n\u003clog_directory\u003e (Required): The directory containing the log files to be archived.\n\n[archive_directory] (Optional): The directory where archives will be stored. Defaults to archives/ inside the log directory.\n\n[max_age_days] (Optional): Number of days after which logs are archived. Defaults to 7 days.\n\n[retention_days] (Optional): Number of days to retain archives. Archives older than this will be deleted. Defaults to 30 days.\n\n## Notes\n\n- Ensure the script has executable permissions. Use chmod +x log_archiver.sh to grant execute permissions.\n\n- Avoid running the script on directories with frequent writes to prevent conflicts during file operations.\n\n## Project Page\n\nFor more informations about this project visite [Log Archive Tool Project](https://roadmap.sh/projects/log-archive-tool)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadreddinkaztaoui%2Ffq_log_archive_script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadreddinkaztaoui%2Ffq_log_archive_script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadreddinkaztaoui%2Ffq_log_archive_script/lists"}