PageRenderTime 63ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

/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
  1. # backup all local filesystems, as defined in mountpoint_device
  2. for k in "${BACKUP_PROG_INCLUDE[@]}" ; do
  3. test "$k" && echo "$k"
  4. done > $TMP_DIR/backup-include.txt
  5. # add the mountpoints that will be recovered to the backup include list
  6. while read mountpoint device junk ; do
  7. if ! IsInArray "$mountpoint" "${EXCLUDE_MOUNTPOINTS[@]}" ; then
  8. echo "$mountpoint"
  9. fi
  10. done <"$VAR_DIR/recovery/mountpoint_device" >> $TMP_DIR/backup-include.txt
  11. # exclude list
  12. for k in "${BACKUP_PROG_EXCLUDE[@]}" ; do
  13. test "$k" && echo "$k"
  14. done > $TMP_DIR/backup-exclude.txt
  15. # add also the excluded mount points to the backup exclude list
  16. for k in "${EXCLUDE_MOUNTPOINTS[@]}" ; do
  17. test "$k" && echo "$k/"
  18. done >> $TMP_DIR/backup-exclude.txt