快照问题

时间:2016-06-03 10:02:20

标签: backup rsync rsnapshot

我正在尝试使用Rsnapshot进行一些备份,并且不断收到此错误:

/usr/bin/rsync -av --delete --numeric-ids --relative --delete-excluded \
--stats -L --whole-file --exclude=*/web/ --exclude=*/tmp/ \
--exclude=*/dms/ --exclude=*/Recycle\ Bin/ --exclude=*/app/logs/ \
--exclude=*/app/cache/ --exclude=*/vendor/ --exclude=/var/www/files/ \
--exclude=*/releases/ \
--exclude=/var/www/www.xxx.net/app/var/sessions/ \
--rsync-path=rsync_wrapper.sh --exclude=/var/www/psan-static/ \
--rsh=/usr/bin/ssh -p 9922 backup@xxx.xxx.xxx.xxx:/var/www \
/data-ext/backups/rsnapshot/daily.0/myserver/

Unexpected remote arg: backup@xxx.xxx.xxx.xxx:/var/www
rsync error: syntax or usage error (code 1) at main.c(1348) [sender=3.1.0]
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot daily
----------------------------------------------------------------------------
ERROR: /usr/bin/rsync returned 1 while processing backup@xxx.xxx.xxx.xxx:/var/www/
/usr/bin/logger -i -p user.err -t rsnapshot /usr/bin/rsnapshot daily: \
ERROR: /usr/bin/rsync returned 1 while processing \
backup@xxx.xxx.xxx.xxx:/var/www/

我试图使用参数,但无法弄清楚问题是什么

1 个答案:

答案 0 :(得分:1)

问题在于

- exclude = * / Recycle \ Bin /

这需要引用,因为空格似乎不起作用。

--exclude="*/Recycle\ Bin/"