Does Windows file share (samba protocol) have an incremental API?











up vote
0
down vote

favorite












I'd like to query a windows share for "all files added/edited/removed since timestamp yyyy/mm/dd hh:mm:ss"



Does such a thing exist?



The only thing I know of is inotify - is this the only option?



https://stackoverflow.com/questions/8124617/getting-file-create-notifications-for-cifs-mount-in-linux



inotify is not really what I want because that is push based when I'm looking for something I call poll.



Kind of sounds like what I'm looking for doesn't exist, but I figured I'd ask here to see if anyone has heard of anything.










share|improve this question


























    up vote
    0
    down vote

    favorite












    I'd like to query a windows share for "all files added/edited/removed since timestamp yyyy/mm/dd hh:mm:ss"



    Does such a thing exist?



    The only thing I know of is inotify - is this the only option?



    https://stackoverflow.com/questions/8124617/getting-file-create-notifications-for-cifs-mount-in-linux



    inotify is not really what I want because that is push based when I'm looking for something I call poll.



    Kind of sounds like what I'm looking for doesn't exist, but I figured I'd ask here to see if anyone has heard of anything.










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'd like to query a windows share for "all files added/edited/removed since timestamp yyyy/mm/dd hh:mm:ss"



      Does such a thing exist?



      The only thing I know of is inotify - is this the only option?



      https://stackoverflow.com/questions/8124617/getting-file-create-notifications-for-cifs-mount-in-linux



      inotify is not really what I want because that is push based when I'm looking for something I call poll.



      Kind of sounds like what I'm looking for doesn't exist, but I figured I'd ask here to see if anyone has heard of anything.










      share|improve this question













      I'd like to query a windows share for "all files added/edited/removed since timestamp yyyy/mm/dd hh:mm:ss"



      Does such a thing exist?



      The only thing I know of is inotify - is this the only option?



      https://stackoverflow.com/questions/8124617/getting-file-create-notifications-for-cifs-mount-in-linux



      inotify is not really what I want because that is push based when I'm looking for something I call poll.



      Kind of sounds like what I'm looking for doesn't exist, but I figured I'd ask here to see if anyone has heard of anything.







      windows samba inotify






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 27 at 18:17









      Nicholas DiPiazza

      40539




      40539






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Apparently no.



          Windows itself (through local disk access) would offer the USN journal, which has the ability to query all changes since a specific journal entry index (you would then store the 'current' index along with every backup). However, this is not available via SMB, according to MS-SMB appendix A section 136:




          Windows does not support USN journal calls because they require a volume handle. The following USN journal calls are also failed with STATUS_NOT_SUPPORTED.



          FSCTL_READ_USN_JOURNAL, FSCTL_CREATE_USN_JOURNAL, FSCTL_QUERY_USN_JOURNAL, FSCTL_DELETE_USN_JOURNAL, FSCTL_ENUM_USN_DATA




          You can also dig through the other SMB messages documented in MS-SMB or MS-SMB2 (section 2). I could not find any messages which would search for files in any way except for enumerating a single directory. (In any case this would be somewhat unusual for a filesystem protocol to have...)






          share|improve this answer





















          • excellent - the USN journal might be just what we need. i will look into it
            – Nicholas DiPiazza
            Nov 27 at 20:20











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1378849%2fdoes-windows-file-share-samba-protocol-have-an-incremental-api%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          Apparently no.



          Windows itself (through local disk access) would offer the USN journal, which has the ability to query all changes since a specific journal entry index (you would then store the 'current' index along with every backup). However, this is not available via SMB, according to MS-SMB appendix A section 136:




          Windows does not support USN journal calls because they require a volume handle. The following USN journal calls are also failed with STATUS_NOT_SUPPORTED.



          FSCTL_READ_USN_JOURNAL, FSCTL_CREATE_USN_JOURNAL, FSCTL_QUERY_USN_JOURNAL, FSCTL_DELETE_USN_JOURNAL, FSCTL_ENUM_USN_DATA




          You can also dig through the other SMB messages documented in MS-SMB or MS-SMB2 (section 2). I could not find any messages which would search for files in any way except for enumerating a single directory. (In any case this would be somewhat unusual for a filesystem protocol to have...)






          share|improve this answer





















          • excellent - the USN journal might be just what we need. i will look into it
            – Nicholas DiPiazza
            Nov 27 at 20:20















          up vote
          1
          down vote



          accepted










          Apparently no.



          Windows itself (through local disk access) would offer the USN journal, which has the ability to query all changes since a specific journal entry index (you would then store the 'current' index along with every backup). However, this is not available via SMB, according to MS-SMB appendix A section 136:




          Windows does not support USN journal calls because they require a volume handle. The following USN journal calls are also failed with STATUS_NOT_SUPPORTED.



          FSCTL_READ_USN_JOURNAL, FSCTL_CREATE_USN_JOURNAL, FSCTL_QUERY_USN_JOURNAL, FSCTL_DELETE_USN_JOURNAL, FSCTL_ENUM_USN_DATA




          You can also dig through the other SMB messages documented in MS-SMB or MS-SMB2 (section 2). I could not find any messages which would search for files in any way except for enumerating a single directory. (In any case this would be somewhat unusual for a filesystem protocol to have...)






          share|improve this answer





















          • excellent - the USN journal might be just what we need. i will look into it
            – Nicholas DiPiazza
            Nov 27 at 20:20













          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          Apparently no.



          Windows itself (through local disk access) would offer the USN journal, which has the ability to query all changes since a specific journal entry index (you would then store the 'current' index along with every backup). However, this is not available via SMB, according to MS-SMB appendix A section 136:




          Windows does not support USN journal calls because they require a volume handle. The following USN journal calls are also failed with STATUS_NOT_SUPPORTED.



          FSCTL_READ_USN_JOURNAL, FSCTL_CREATE_USN_JOURNAL, FSCTL_QUERY_USN_JOURNAL, FSCTL_DELETE_USN_JOURNAL, FSCTL_ENUM_USN_DATA




          You can also dig through the other SMB messages documented in MS-SMB or MS-SMB2 (section 2). I could not find any messages which would search for files in any way except for enumerating a single directory. (In any case this would be somewhat unusual for a filesystem protocol to have...)






          share|improve this answer












          Apparently no.



          Windows itself (through local disk access) would offer the USN journal, which has the ability to query all changes since a specific journal entry index (you would then store the 'current' index along with every backup). However, this is not available via SMB, according to MS-SMB appendix A section 136:




          Windows does not support USN journal calls because they require a volume handle. The following USN journal calls are also failed with STATUS_NOT_SUPPORTED.



          FSCTL_READ_USN_JOURNAL, FSCTL_CREATE_USN_JOURNAL, FSCTL_QUERY_USN_JOURNAL, FSCTL_DELETE_USN_JOURNAL, FSCTL_ENUM_USN_DATA




          You can also dig through the other SMB messages documented in MS-SMB or MS-SMB2 (section 2). I could not find any messages which would search for files in any way except for enumerating a single directory. (In any case this would be somewhat unusual for a filesystem protocol to have...)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 27 at 18:35









          grawity

          230k35483542




          230k35483542












          • excellent - the USN journal might be just what we need. i will look into it
            – Nicholas DiPiazza
            Nov 27 at 20:20


















          • excellent - the USN journal might be just what we need. i will look into it
            – Nicholas DiPiazza
            Nov 27 at 20:20
















          excellent - the USN journal might be just what we need. i will look into it
          – Nicholas DiPiazza
          Nov 27 at 20:20




          excellent - the USN journal might be just what we need. i will look into it
          – Nicholas DiPiazza
          Nov 27 at 20:20


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1378849%2fdoes-windows-file-share-samba-protocol-have-an-incremental-api%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Probability when a professor distributes a quiz and homework assignment to a class of n students.

          Aardman Animations

          Are they similar matrix