# or (at your option) any later version.
-if [ $# -lt 2 ]
-then
+if [ $# -lt 2 ]; then
echo "Usage: $0 SOURCE DEST [RSYNC_OPTS]"
exit 1
fi
do_prune()
{
- local old="`ls | head -n -$N_SNAPSHOT`"
+ local old="`ls | grep -v tmp | head -n -$N_SNAPSHOT`"
if [ ! -z "$old" ]; then
echo "$(date): Removing oldest snapshot(s): $old..."
rm -rf "$old" || exit 669
do_link()
{
- local newest=`ls | tail -n 1`
+ local newest=`ls | grep -v tmp | tail -n 1`
if [ -z "$newest" ]; then
echo "$(date): No previous snapshot found, performing a full backup!"
elif [ -d "$DEST/tmp" ]; then