0

Can anyone please tell me why this rsync command doesn't delete?

It just keeps adding new files, but never deleting files on the destination that are no longer on the source.

rsync -avz -e --delete --rsh='ssh -p1157' /backup/virtualservers/monthly/ [removed for security]:/volume1/NetBackup/virtalservers/monthly

4

1 回答 1

1

the -e argument is the same as the --rsh according to the man page

-e, --rsh=COMMAND This option allows you to choose an alternative remote shell program to use for communication between the local and remote copies of rsync. Typically, rsync is configured to use ssh by default, but you may prefer to use rsh on a local network.

so I think your command is confusing, try the following instead:

rsync -avz --delete --rsh='ssh -p1157' /backup/virtualservers/monthly/ [removed for security]:/volume1/NetBackup/virtalservers/monthly

Romain

于 2013-04-21T19:17:09.590 回答