This is what I use, to back up from OS X. You'll most likely need to change the paths to where your NAS is mounted on your machine, and what folder you're backing up. This is a bash script, so it won't work on Windows.
Code:
#! /bin/sh
pathtonetwork=/Volumes/public;
if
cd $pathtonetwork
then
echo "TIME NOW:"
date
echo "BACKING UP ITUNES LIBRARY TO SERVER..."
#lookup how rsync works, if you're on a unix then it's probably the best way of doing this.
rsync -av --delete ~/Music/iTunes/iTunes\ Music/ $pathtonetwork/Chris/Music
# ^ repeat for other folders that need backing up
echo
echo "NETWORK BACKUP COMPLETED AT:"
date
else
echo "Network drive is NOT MOUNTED."
fi