Skip to content

Instantly share code, notes, and snippets.

View SohaibBazaz's full-sized avatar

Sohaib Ahmed Bazaz SohaibBazaz

View GitHub Profile
@SohaibBazaz
SohaibBazaz / gist:a782bf6aa5dc3a89afaab09e4565c149
Last active July 10, 2024 15:41
This is a straightforward script designed to automate Duplicity for backing up Docker volumes to an external hard drive. It includes a detailed log file for backup information and automatically deletes backups older than 20 days to manage storage efficiently.
#!/bin/bash
# Define backup destination (replace with your external drive path)
BACKUP_DEST="/path/to/backup_drive"
LOG_FILE="/path/to/backup.log"
# Clear log file
echo "Starting backup process at $(date)" > "$LOG_FILE"
echo "" >> "$LOG_FILE"