cmittle
November 3rd, 2008, 12:48 PM
This is a script I have written to run rsync to backup all of the stuff on my server to another drive mounted in the same computer.
#!/bin/sh
progname=${0##*/}
toppid=$$
#above used to grab the name of the script and associated
#process id
#Folders to exclude
EXCLUDES=/media/200gdisk/rsync/exclude.txt
#Folders to include
INCLUDES=/media/200gdisk/rsync/include.txt
##Define backup path
PATH=/media/200gdisk/rsync/test
#####Rsync options to be used
#-n dry run
#-a archive; tells rsync to retain permissions and ownership and recursive
#-v verbose
#-z compress
#--progress tells user how many files are left to be copied
#--delete any files on the receiving side if they do not exist
#on the sending side
#-t transfers modification timestamp with files
#--include-from=FILE points to include file; this is read as exception to excludes..maybe
#--exclude-from=FILE points to exclude file
OPTS="-nvazt --progress --delete --include-from=$INCLUDES --exclude-from=$EXCLUDES "
#Display statement
echo "Preparing to backup with..."
#Echo command that will run and sleep for 20 seconds
echo rsync $OPTS / $PATH
#sleep 20
#Run actual command
rsync $OPTS / $PATH
When I run this script I get the following;
Preparing to backup with...
rsync -nvazt --progress --delete --include-from=/media/200gdisk/rsync/include.txt --exclude-from=/media/200gdisk/rsync/exclude.txt / /media/200gdisk/rsync/test
/media/200gdisk/rsync/server_backup.sh: 42: rsync: not found
Can someone please help me determine what I am doing wrong here?
Thanks,
Cory
#!/bin/sh
progname=${0##*/}
toppid=$$
#above used to grab the name of the script and associated
#process id
#Folders to exclude
EXCLUDES=/media/200gdisk/rsync/exclude.txt
#Folders to include
INCLUDES=/media/200gdisk/rsync/include.txt
##Define backup path
PATH=/media/200gdisk/rsync/test
#####Rsync options to be used
#-n dry run
#-a archive; tells rsync to retain permissions and ownership and recursive
#-v verbose
#-z compress
#--progress tells user how many files are left to be copied
#--delete any files on the receiving side if they do not exist
#on the sending side
#-t transfers modification timestamp with files
#--include-from=FILE points to include file; this is read as exception to excludes..maybe
#--exclude-from=FILE points to exclude file
OPTS="-nvazt --progress --delete --include-from=$INCLUDES --exclude-from=$EXCLUDES "
#Display statement
echo "Preparing to backup with..."
#Echo command that will run and sleep for 20 seconds
echo rsync $OPTS / $PATH
#sleep 20
#Run actual command
rsync $OPTS / $PATH
When I run this script I get the following;
Preparing to backup with...
rsync -nvazt --progress --delete --include-from=/media/200gdisk/rsync/include.txt --exclude-from=/media/200gdisk/rsync/exclude.txt / /media/200gdisk/rsync/test
/media/200gdisk/rsync/server_backup.sh: 42: rsync: not found
Can someone please help me determine what I am doing wrong here?
Thanks,
Cory