---
title: "#backup-and-clean-old-logs articles | Hashnode"
description: "Explore 1 articles tagged #backup-and-clean-old-logs on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/backup-and-clean-old-logs"
---

Tag

# #backup-and-clean-old-logs

1 posts · 0 followers

[Puppala Manikanta Pavan Kumar](https://hashnode.com/@pavankumarpuppala) · [Jun 26](https://hashnode.com/posts/backup-and-clean-old-logs/6a3eaf562734d9cc8f7feb25)

### [One Shell Script to Backup and Clean Old Logs](https://devopswithpmpk.hashnode.dev/backup-and-clean-old-logs?utm_source=hashnode&utm_medium=feed)

#!/bin/bash userid=$(id -u) # Log Details LOGS\_FOLDER="/var/log/shellscript" SCRIPT\_NAME=\\((basename "\\)0" .sh) LOG\_FILE="\\(LOGS\_FOLDER/\\)SCRIPT\_NAME.log" # Color codes R="\\e\[31m" G="\\e\[32m" Y="\\e\[

3 min read · [devopswithpmpk.hashnode.dev](https://devopswithpmpk.hashnode.dev/backup-and-clean-old-logs?utm_source=hashnode&utm_medium=feed)
