I use my vector box to backup selected folders from my two windows pc's. I wanted to automate this a bit, copying everything in windows explorer is kind of a drag. here it is, thought others might find it useful. I'll try to just put it in as code. You'll have to copy it into a file, then change the file to an executable. All the variables are near the top, you'll need to change the folder names and the user/password for the shares. This example backs up four folders found in two different pc's. It first deletes the oldest folder in the /home/user/backups folder. The smbclient recurses through all the subfolders.
#!/bin/bash
#backup script using smbclient
# LLL 091607
#/home/user1/scripts/mySMBBackup
FRMDIR='pc1/my_docs pc1/shared_folder pc1/my_music pc2/school_work'
TODIR='/home/user1/backups'
USR=user1
PW=password1
#Move to backup folder
if cd $TODIR
then echo "$TODIR located"
else echo "$TODIR not located"
exit 0
fi
#remove oldest backup
OLD=`ls -Ftr|grep /|head -1`
if rm -rf $OLD
then echo "Folder $OLD deleted"
else echo "Folder $OLD not deleted"
fi
#Make new folder
FLDR=$TODIR/`date +%Y%b%d_%M`
if mkdir $FLDR
then echo "Created folder $FLDR"
else echo "Folder $FLDR not created"
exit 0
fi
#Do backups
for ITEM in $FRMDIR
do
#move to top folder
if cd $FLDR
then echo "Moved to $FLDR"
else echo "Move to $FLDR failed"
exit 0
fi
#mk subdir
if mkdir -p $ITEM
then echo "subfolder $ITEM created"
else echo "subfolder $ITEM not created"
exit 0
fi
cd $ITEM
#get files
if smbclient //$ITEM -U$USR%$PW -c "lowercase; prompt; recurse; mask *; mget *"
then echo "`ls -r *|wc -l` files copied from $ITEM"
else echo "smbclient failed at $ITEM"
exit 0
fi
done