#
# The cron bot is expected to run once a minute
+# Name of snapshot tag file for "important" snapshots. Format:
+# $CNO .... one line for each $CNO that should be preserved as snapshot
+# chcp ss $CNO && echo $CNO >> $NAMELIST
+NAMELIST=/etc/nilfs2sss.list
+
# The hour-of-day to preserve as daily snapshot
KEEPHH=12
MARK=( )
function marksnap() {
if [[ "${MARK[0]}" == "$1" ]] && [[ "${MARK[1]}" = "$2" ]] ; then
- chcp cp $DEV ${MARK[2]}
+ if [ -r "$NAMELIST" ] && grep -q ^$3 "$NAMELIST" ; then
+ : # Don't change important snapshots
+ else
+ chcp cp $DEV ${MARK[2]}
+ fi
fi
MARK=( "$1" "$2" "$3" )
}