Skip to content

Commit

Permalink
Added possibility to only backup BACKUP_PROG_INCLUDE
Browse files Browse the repository at this point in the history
  • Loading branch information
rpasche committed Jun 9, 2015
1 parent 9fa2faa commit 0359a0c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions usr/share/rear/layout/save/default/31_include_exclude.sh
Expand Up @@ -20,6 +20,18 @@
# mark_tree_as_done "fs:$mountpoint"
#done

# check if in MANUAL_INCLUDE mode. If YES, mark all filesystems
# NOT included in BACKUP_PROG_INCLUDE as done
if [ "${MANUAL_INCLUDE:-NO}" == "YES" ] ; then
while read fs device mountpoint junk ; do
if ! IsInArray "$mountpoint" "${BACKUP_PROG_INCLUDE[@]}" ; then
LogPrint "Excluding mountpoint $mountpoint. (MANUAL_INCLUDE mode)"
mark_as_done "fs:$mountpoint"
mark_tree_as_done "fs:$mountpoint"
fi
done < <(grep ^fs $LAYOUT_FILE)
fi

for md in "${EXCLUDE_MD[@]}" ; do
LogPrint "Excluding RAID $md."
mark_as_done "/dev/$md"
Expand Down

0 comments on commit 0359a0c

Please sign in to comment.