rsync não exclui arquivos no diretório de destino

1

O seguinte comando rsync não exclui arquivos no diretório de destino

rsync -avr --delete [email protected]:/home/hulio/hotspots_test/* /home/zsumo/hotpoint/data  

Como posso resolver isso?

    
por Warden 30.03.2017 / 13:19

1 resposta

4

O problema com o comando é que ele inclui * em hotspots_test/*

O comando rsync --delete não funciona com entradas curinga

homem do rsync

--delete

This tells rsync to delete extraneous files from the receiving side (ones that aren't on the sending side), but only for the directories that are being synchronized. You must have asked rsync to send the whole directory (e.g. lqdirrq or lqdir/rq) without using a wildcard for the directory's contents (e.g. lqdir/*rq) since the wildcard is expanded by the shell and rsync thus gets a request to transfer individual files, not the files' parent directory. Files that are excluded from the transfer are also excluded from being deleted unless you use the --delete-excluded option or mark the rules as only matching on the sending side (see the include/exclude modifiers in the FILTER RULES section).

    
por 30.03.2017 / 13:26

Tags