This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Cron installation: | |
# 30 05 * * 0 /root/scripts/raspberry-pi-backup.sh >> /var/log/backup.log 2>&1 | |
# Configuration | |
external="/mnt/backup" # Check if external storage is mounted | |
folder="$external/raspi" # Base backup folder | |
dev="/dev/mmcblk0" # Device to backup | |
days=60 # Delete backups older than X days |