No description
- Shell 100%
| backup-exclude.txt | ||
| pbackup.sh | ||
| README.md | ||
pbackup
Simple rsync-based backup script for copying filepile to one of two portable backup disks.
Usage
Backup to portable1:
./pbackup.sh --portable1
Backup to portable2:
./pbackup.sh --portable2
Test with a dry run:
./pbackup.sh --portable1 --dry-run
The arguments can be used in either order:
./pbackup.sh --dry-run --portable1
What it does
- Uses
rsync - Runs rsync with
sudo - Preserves normal file attributes
- Deletes files from the destination that no longer exist in the source
- Reads exclusions from
backup-exclude.txt - Supports
--dry-runfor safely checking changes
Paths
Source:
/mnt/courage/filepile/
Destinations:
/mnt/portable1/filepile/ /mnt/portable2/filepile/
Exclusions:
./backup-exclude.txt
Important
Because the backup uses --delete, always consider doing a dry run first:
./pbackup.sh --portable1 --dry-run
Nothing is changed during a dry run.