wiki/assets/cli.borg/safe-borg-backup
2022-07-29 15:41:17 +00:00

9 lines
358 B
Plaintext
Executable File

#/usr/bin/env bash
if $# -eq 1; then echo "No directories and files to be saved." && exit 1; fi
locations=$@
borg create --verbose --stats --compression lz4 --exclude '**/.node_modules' ::{hostname}-{now:%F-%H-%M-%S-%z} ${locations[@]}
borg check --verbose --verify-data
borg prune --verbose --keep-daily 7 --keep-hourly 7 --keep-weekly 6 --keep-monthly 6