I know this question has been asked alot but I still have issues with it.
I want to do the following with rsyncrsync.
Directory structure example
- home/netadmin/docker-data
- home/netadmin/docker-data/uptime-kuma/
- home/netadmin/docker-data/uptime-kuma/error.log
I want to rsyncrsync the docker-datadocker-data directory but want to exclude the home/netadmin/docker-data/uptime-kuma/home/netadmin/docker-data/uptime-kuma/ directory but want to include home/netadmin/docker-data/uptime-kuma/errorhome/netadmin/docker-data/uptime-kuma/error.log.log
I'm using the following command :
rsync -av --delete --include-from='/home/netadmin/include.txt' --exclude-from='/home/netadmin/exclude.txt' /home/netadmin/docker-data /home/netadmin/temp/
rsync -av --delete --include-from='/home/netadmin/include.txt' --exclude-from='/home/netadmin/exclude.txt' /home/netadmin/docker-data /home/netadmin/temp/
The directory is being excluded but the file is not copied.
My question is, is it posiblepossible?
This is how my include and exclude files lookslook like :
exclude.txt uptime-kuma/
uptime-kuma/
include.txt
- error.log
+ error.log