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 | |
| # | |
| # Incremental backup script for SD card on macOS with rotation | |
| # | |
| # === CONFIGURATION === | |
| SDCARD="/Volumes/M8" # Mount point of the SD card | |
| BACKUPDIR="$HOME/Backups/m8-sd-backups" # Where backups are stored | |
| DATE=$(date +%Y-%m-%d-%H%M%S) # Timestamp for snapshot folder | |
| DEST="$BACKUPDIR/backup-$DATE" # New backup folder |