dotfiles/backup/restic_backup.sh

6 lines
290 B
Bash
Raw Normal View History

2020-06-03 16:51:40 +03:00
#!/bin/sh
restic snapshots > /dev/null || restic init || exit 0
restic backup $RESTIC_PARAMS $BACKUP_PATHS || exit 0
restic forget --verbose --group-by "paths,tags" --keep-daily $RETENTION_DAYS --keep-weekly $RETENTION_WEEKS --keep-monthly $RETENTION_MONTHS --keep-yearly $RETENTION_YEARS