The "trick" is to not exclude the uptime-kuma directory, but its contents.
With an include pattern of error.log and an exclude pattern of uptime-kuma/*, you would include the file uptime-kuma/error.log before excluding everything else in that subdirectory.
With uptime-kuma/ instead of uptime-kuma/*, you would exclude the directory, and rsync would never look inside it.
rsync -av --delete \
--include=error.log \
--exclude='uptime-kume/*' \
~netadmin/docker-data ~netadmin/temp/
I hope this is an equivalent test:
$ tree
.
`-- topdir
|-- file-1
|-- file-2
|-- file-3
|-- file-4
|-- file-5
`-- subdir
|-- file-a
|-- file-b
|-- file-c
|-- file-d
|-- file-e
`-- myfile
2 directories, 11 files
$ rsync -av --include=myfile --exclude='subdir/*' topdir/ copydir
sending incremental file list
created directory copydir
./
file-1
file-2
file-3
file-4
file-5
subdir/
subdir/myfile
sent 436 bytes received 171 bytes 1,214.00 bytes/sec
total size is 0 speedup is 0.00
$ tree copydir
copydir
|-- file-1
|-- file-2
|-- file-3
|-- file-4
|-- file-5
`-- subdir
`-- myfile
1 directory, 6 files
As a tip: You will get the reasoning behind why rsync includes or excludes things if you use -vv.
This is using the "wrong" exclusion pattern:
$ rm -r copydir
$ rsync -avv --include=myfile --exclude='subdir/' topdir/ copydir
sending incremental file list
[sender] hiding directory subdir because of pattern subdir/
created directory copydir
delta-transmission disabled for local transfer or --whole-file
./
file-1
file-2
file-3
file-4
file-5
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 326 bytes received 211 bytes 1,074.00 bytes/sec
total size is 0 speedup is 0.00
This is using the "correct" exclusion pattern:
$ rm -r copydir
$ rsync -avv --include=myfile --exclude='subdir/*' topdir/ copydir
sending incremental file list
[sender] hiding file subdir/file-a because of pattern subdir/*
[sender] hiding file subdir/file-b because of pattern subdir/*
[sender] hiding file subdir/file-c because of pattern subdir/*
[sender] hiding file subdir/file-d because of pattern subdir/*
[sender] hiding file subdir/file-e because of pattern subdir/*
[sender] showing file subdir/myfile because of pattern myfile
created directory copydir
delta-transmission disabled for local transfer or --whole-file
./
file-1
file-2
file-3
file-4
file-5
[generator] risking file subdir/myfile because of pattern myfile
subdir/
subdir/myfile
total: matches=0 hash_hits=0 false_alarms=0 data=0
sent 436 bytes received 307 bytes 1,486.00 bytes/sec
total size is 0 speedup is 0.00
uptime-kuma/error.log? Since it's looking relative to the directory the transfer is in (/home/netadmin/docker-data)