rsync slow exclude folder
paul+rsync at wurtel.net
Sat Feb 28 07:18:19 MST 2015
On Sat 28 Feb 2015, ????? ?????? wrote:
> rsync version 3.0.9 protocol version 30
> rsync -a --exclude="tmp/*" /home/ /backup/home/
> It is necessary that the contents of the folder tmp copy, but the folder tmp in
> backup was created.
> If the folder /home/tmp/ is many millions of files, rsync
> think of this folder can be seen through the lsof -p PID
> If you do so: rsync -a --exclude="tmp/" /home/ /backup/home/
> then backup is done very quickly, but tmp folder in the backup does not
> will be created.
> How to make so that rsync long thought over such folders, but
> This created a backup of them empty?
I think the problem is that you only excluded files in tmp, not also
directories. So if you have a directory /home/tmp/subdir/ that directory
will still be created on the destination side. That is why rsync has to
check every entry in the tmp directory: to see if it is a directory.
Try --exclude="tmp/**" to exclude everything under tmp, including
More information about the rsync