fi
# Before we begin writing, remove old backup dirs until we have room.
+# Assume backups for any VE are fair game for removal if space is needed.
# Other disk contents shall not be removed.
dstblks=$(df -P "$EXTFS" | grep "$EXTFS" | awk '{ print $4 }')
while [ $dstblks -le $srcblks ]; do
info "Only $dstblks free on $EXTFS"
- oldest=$(cd $EXTFS && eval ls -td "ve${VEID}*" 2>/dev/null | tail -1)
+ oldest=$(cd $EXTFS && eval ls -td "ve[0-9]*" 2>/dev/null | tail -1)
if [ -z "$oldest" ]; then
cleanup 1 "out of space: need $srcblks KB, have $dstblks KB"
elif [ -d "$EXTFS/$oldest" ]; then