I'm trying to setup an exclude file but I want it to be in a variable so if the path changes I only have to change it once. This is the syntax I'm using:
rsync --filter='merge ${excludefile}' -vvrbu --delete-delay --force ${sourcepath}local/uodata ${pathname}
I get this error:
rsync: failed to open exclude file $excludefile: No such file or directory (2)
rsync error: error in file IO (code 11) at exclude.c(1062) [client=3.0.3]
What am I doing wrong? For some reason it's not parsing the variable properly. The other variables do parse out ok. I have this same command run about 30 times for different folders, so I really don't want to type it out manually as if I decide to change the path then I have to redo the whole backup script.
rsync --filter='merge ${excludefile}' -vvrbu --delete-delay --force ${sourcepath}local/uodata ${pathname}
I get this error:
rsync: failed to open exclude file $excludefile: No such file or directory (2)
rsync error: error in file IO (code 11) at exclude.c(1062) [client=3.0.3]
What am I doing wrong? For some reason it's not parsing the variable properly. The other variables do parse out ok. I have this same command run about 30 times for different folders, so I really don't want to type it out manually as if I decide to change the path then I have to redo the whole backup script.
