Additional Storage Locations for Channels DVR Recordings

Would like to add this to the FAQ's, but I'm too confused to do it.

Does the quoting and escaping only matter for the OS that is running and executing the curl command (Windows command line curl vs. Windows PowerShell vs. Linux/ Mac terminal curl?) against the DVR server, or is it for the OS the DVR is installed on?

Appears that I'm not the only one confused (and if I am, then whomever isn't please update the FAQ's).

Seems this comes up enough to make it a FAQ and nail it down, same as migrating Channels DVR from one server to another.

C:\Users\jaysi>curl.exe -XPATCH --data-binary '{"""ExtraPaths""":"""D:\DVR"""}' http://192.168.0.4:8089/dvr
false

:frowning:

What error does the Log tab of the DVR show?

I remember if running curl on windows you recommended this that worked.

2019/10/29 21:20:39 [ERR] invalid recorder settings: invalid character 'E' looking for beginning of object key string

checking to see if the log I posted provided any help?

What version of Windows are you running?

Try this one:

curl.exe -XPATCH --data-binary "{"""ExtraPaths""":"""D:\DVR"""}" http://192.168.0.4:8089/dvr

Windows 10, still get "False" on the latest suggestion.

can you try the pwershell command in windows 10.

$payload = '{"ExtraPaths":"D:\DVR"}'
Invoke-RestMethod -Method Patch -Body $payload -uri http://xxx.xxx.xxx.xxx:8089/dvr

Got this:
Invoke-RestMethod : false
At line:2 char:1

  • Invoke-RestMethod -Method Patch -Body $payload -uri http://192.168.0. ...
  •   + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
     eption
      + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

This should work just change edsynology to your ip.

curl.exe -XPATCH --data-binary "{\"ExtraPaths\":\"D:/DVR\"}" http://EDSYNOLOGY:8089/dvr
1 Like

Much appreciated, that did it via command prompt.

I noticed when you reposted it drops the escapes that windows needs.... so for anybody looking to do this it causes confusion.

I'm surprised that's (D:/DVR) a valid path in Windows since Windows uses back slashes (\) instead of forward slashes (/) in paths.

Shouldn't it be ?

curl.exe -XPATCH --data-binary "{\"ExtraPaths\":\"D:\\DVR\"}" http://EDSYNOLOGY:8089/dvr

Two more questions

  1. When running the DVR on Windows, do you separate multiple ExtraPaths with a semicolon instead of colon in the json payload?
    i.e.
"{\"ExtraPaths\":\"D:\\DVR;E:\\DVR\"}"
  1. How do your remove/null out the ExtraPaths, is it ?
curl.exe -XPATCH --data-binary "{\"ExtraPaths\":\"\"}" http://x.x.x.x:8089/dvr

I believe that the system libraries in Go handle the translation between \ (Windows), '/' (BSD/Linux), and : (HFS/HFS+, on macOS), so using / across the board for all paths doesn't cause any problems.

Could be. I don't have a Windows install of Channels DVR.
Was just trying to nail this down and put in a FAQ since it's not implemented in the web UI and is more of a DVR 'hack' that seems to confuse most everyone and quoting past posts strips escape chars.

1 Like

Reading through this entire topic I am still not 100% sure how to make this work on a Windows 10 machine. Some posts reference using Powershell, some reference using command prompt. I'm not ready to do it yet, and I am sure i will figure it out, but a GUI option would be so appreciated.

1 Like

I agree it is a pain in the butt adding this to the webpage would be great.

2 Likes