# [source]
# include = include folder on backup
# exclude = exclude folder on backup
-# type = local or remote
+# from = local or remote
# ssh = ssh command line (remote only)
# rsync = rsync command line
#
getconf lockfile
setsection source
-getconf type local
-getconf rsync rsync -av --delete
+getconf from local
+getconf rsync "rsync -av --delete"
getconf ssh ssh
getconf user
getconf host
rotate $backupdir/$SECTION/$section $keep
info "Syncing $SECTION on $backupdir/$SECTION/$section.0..."
- if [ "$type" == "local" ]; then
+ if [ "$from" == "local" ]; then
$rsync $EXCLUDES /$SECTION/ $backupdir/$SECTION/$section.0/ >> $log
- elif [ "$type" == "remote" ]; then
+ elif [ "$from" == "remote" ]; then
if [ -z "$user" ] || [ -z "$host" ]; then
error "Config file error: either user or host was not specified"
exit 1
$rsync "$ssh" $user@$host:/$SECTION/ $backupdir/$SECTION/$section.0 >> $log
fi
else
- error "Invalid source type $type"
+ error "Invalid source $from"
exit 1
fi