• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

help with rsync exclude file

Red Squirrel

No Lifer
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.
 
Ok so I managed to find a different syntax. This is my command:

rsync --exclude-from=${excludefile} -vvrbu --delete-delay --force ${sourcepath}local/uodata ${pathname}

My exclude file has this:

+ **/saves/** (is double asterix right? I saw different variations of this with no doc on what it means)

Now, it does find the file, but for whatever reason, it interprets that as ~*. Don't ask. This is part of what the log looks like:

[generator] protecting file uodata/stadifl2.mul.BAK~ because of pattern *~
[generator] protecting file uodata/map1.mul.BAK~ because of pattern *~
[generator] protecting file uodata/mapdifl1.mul.BAK~ because of pattern *~
[generator] protecting file uodata/multi.idx.BAK~ because of pattern *~
[generator] protecting file uodata/tiledata.mul.BAK~ because of pattern *~
[generator] protecting file uodata/statics4.mul.BAK~ because of pattern *~
[generator] protecting file uodata/_delbak.cmd~ because of pattern *~
[generator] protecting file uodata/map4.mul.BAK~ because of pattern *~
[generator] protecting file uodata/stadifi2.mul.BAK~ because of pattern *~
uodata/map0.mul is newer
uodata/map1.mul is newer
uodata/map2.mul is newer
uodata/map3.mul is newer
uodata/map4.mul is newer
uodata/mapdif0.mul is newer
uodata/mapdif1.mul is newer


Where is it getting this *~ pattern from?
 
Back
Top