Commit f708ce47 authored by Daniel STAN's avatar Daniel STAN

abort si parent vide

parent 6d79d2d5
......@@ -37,12 +37,15 @@ elif [ "$1" = "incsend" ]; then
SNAP=`available_local | sort | tail -n 1`
echo "Trying to send last snap $SNAP"
PARENT=`available_common | sort | tail -n 1`
echo "Parent $PARENT"
read -p "[press enter to continue]"
if [ "$PARENT" = "$SNAP" ]; then
echo "Parent and Snap coincide ! Already sent ! Aborting"
exit 1
elif [ "$PARENT" = "" ]; then
echo "No common parent. Please send a full backup"
exit 2
fi
echo "Parent $PARENT"
read -p "[press enter to continue]"
btrfs_send -p $FS_DIR/$BACK_DIR/$PARENT $FS_DIR/$BACK_DIR/$SNAP | $REMOTE receive $SNAP $PARENT
elif [ "$1" = "receive" ]; then
btrfs receive $FS_DIR/$BACK_DIR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment