Hi Ncw/Ole thank you both for your answer.
Yes I saw the link and I'm already able to raise a sync via Curl (I'm using postman).
Let me explain better what I would like to do. This is my folder structure (I created it for testing purpose):
/home/pi/backup/
├── folder1
│ ├── demo.txt
│ └── touch.txt
── folder2
│ └── touch.txt
└── folder3
└── sensitive.txt
What I would to do is sync my backup folder to google drive but exclude all "demo.txt" files and also "sensitive.txt".
I can do it easly from command line with a syntax like this:
sync /home/pi/backup/ Google:tmp -vv --exclude demo.txt --exclude sensitive.txt
Unfortunately I could not do the same from Rest API (POSTing a JSON blob) it seems I'm not able
to specify an exclusion.
I try in different way:
{
"srcFs": "/home/pi/backup",
"dstFs": "Google:/tmp",
"_filter" : {
"_exclude":"demo.txt"
},
"_config": { "DryRun": true },
"exclude" : ["demo.txt"]
}
I also tried the following one but it should be anyway wrong:
{
"srcFs": "/home/pi/backup",
"dstFs": "Google:/backup/temp",
"_filter" : {
"_exclude":"demo.txt"
},
"_config": { "DryRun": true },
"_filter": {
"exclude": "demo.txt"
}
}
It seems to me (not yet tested) the only solution is to create a filter.txt in my main machine and raise it in __filter section. Am I correct?
How can I filter different file/folder in a sync command via a RestAPI call? The only way is to use a filter file? I would prefer to avoid it.
Thanks for clarifying to me this.
This is also a screenshot about my call:
Ale