/rear-1.12.0/usr/share/rear/backup/NETFS/default/40_create_include_exclude_files.sh
Shell | 21 lines | 14 code | 3 blank | 4 comment | 8 complexity | 8af70ebcc11f7d1ad67057fe60f0904b MD5 | raw file
Possible License(s): GPL-2.0
- # backup all local filesystems, as defined in mountpoint_device
- for k in "${BACKUP_PROG_INCLUDE[@]}" ; do
- test "$k" && echo "$k"
- done > $TMP_DIR/backup-include.txt
- # add the mountpoints that will be recovered to the backup include list
- while read mountpoint device junk ; do
- if ! IsInArray "$mountpoint" "${EXCLUDE_MOUNTPOINTS[@]}" ; then
- echo "$mountpoint"
- fi
- done <"$VAR_DIR/recovery/mountpoint_device" >> $TMP_DIR/backup-include.txt
- # exclude list
- for k in "${BACKUP_PROG_EXCLUDE[@]}" ; do
- test "$k" && echo "$k"
- done > $TMP_DIR/backup-exclude.txt
- # add also the excluded mount points to the backup exclude list
- for k in "${EXCLUDE_MOUNTPOINTS[@]}" ; do
- test "$k" && echo "$k/"
- done >> $TMP_DIR/backup-exclude.txt