你用的是: > bash$ rsync -a 144.16.251.213::test test > Password: > @ERROR: auth failed on module test > > I dont understand this. Can somebody explain as to how to acomplish this. > All suggestions are welcome.
应该是没有以你的用户名登陆导致的问题,试试rsync -a max@144.16.251.213::test test
四、一些可借鉴的脚本
这里这些脚本都是rsync网站上的例子:
1、每隔七天将数据往中心服务器做增量备份
#!/bin/sh
# This script does personal backups to a rsync backup server. You will end up # with a 7 day rotating incremental backup. The incrementals will go # into subdirectories named after the day of the week, and the current # full backup goes into a directory called "current" #
# directory to backup BDIR=/home/$USER
# excludes file - this contains a wildcard pattern per line of files to exclude EXCLUDES=$HOME/cron/excludes
# the name of the backup machine BSERVER=owl
# your password on the backup server export RSYNC_PASSWORD=XXXXXX
# the following line clears the last weeks incremental directory [ -d $HOME/emptydir ] || mkdir $HOME/emptydir rsync --delete -a $HOME/emptydir/ $BSERVER::$USER/$BACKUPDIR/ rmdir $HOME/emptydir
# now the actual transfer rsync $OPTS $BDIR $BSERVER::$USER/current
2、备份至一个空闲的硬盘
#!/bin/sh
export PATH=/usr/local/bin:/usr/bin:/bin
LIST="rootfs usr data data2"
for d in $LIST; do mount /backup/$d rsync -ax --exclude fstab --delete /$d/ /backup/$d/ umount /backup/$d done
DAY=`date "+%A"`
rsync -a --delete /usr/local/apache /data2/backups/$DAY rsync -a --delete /data/solid /data2/backups/$DAY
3、对vger.rutgers.edu的cvs树进行镜像
#!/bin/bash
cd /var/www/cvs/vger/ PATH=/usr/local/bin:/usr/freeware/bin:/usr/bin:/bin
RUN=`lps x | grep rsync | grep -v grep | wc -l` if [ "$RUN" -gt 0 ]; then echo already running exit 1 fi