VIP 👤
🏠 Accueil
Benchmarks
📊 Tous les Benchmarks 🦖 Dinosaure v1 🦖 Dinosaure v2 ✅ To-Do List Apps 🎨 Pages Libres 🎯 FSACB - Showcase 🌍 Traduction
Modèles
🏆 Top 10 Modèles 🆓 Modèles Gratuits 📋 Tous les Modèles ⚙️ Modes Kilo Code
Ressources
💬 Prompts IA 📖 Glossaire IA 🔗 Liens Utiles 🔌 API & Routeurs
Medium

Automate Directory Backup with Bash

#bash #scripting #linux #automation

Create a shell script to compress and timestamp a specific directory for backup purposes.

Write a Bash script that takes a directory path as an argument. The script should create a compressed tar.gz archive of that directory, append the current date (YYYY-MM-DD) to the filename, and save it to a predefined backup folder. Include error handling to check if the directory exists.