{"id":249,"date":"2021-11-22T17:51:00","date_gmt":"2021-11-22T16:51:00","guid":{"rendered":"https:\/\/marcusfranke.de\/?p=249"},"modified":"2025-10-13T20:16:05","modified_gmt":"2025-10-13T19:16:05","slug":"nextcloud-synchronisationsprobleme","status":"publish","type":"post","link":"https:\/\/markoschka.de\/?p=249","title":{"rendered":"Nextcloud Synchronisationsprobleme"},"content":{"rendered":"\n<p>Einer meiner Synchronisationsjobs hat immer wieder Probleme gemacht und sich abgeschossen. <br>Da ich im Internet keine L\u00f6sung gefunden habe und selbst mehrere Tage dar\u00fcber gegr\u00fcbelt habe muss ich meine L\u00f6sung \u00fcber meinen Block mit Euch Teilen.<\/p>\n\n\n\n<p class=\"has-large-font-size\">Synchronisationsumgebung<\/p>\n\n\n\n<p>Ich Synchronisiere ein Verzeichnis in der Nextcloud mit zwei Windows Rechnern,<br>dabei dient die Nextcloud nur als \u00fcbertragungsweg f\u00fcr meine Daten und nicht als fester Speicher.<br>Die zu \u00fcbertragenen Daten sind fl\u00fcchtiger Natur und werden nach Verarbeitung auf dem Zielrechner gel\u00f6scht <br>und somit auch in der Nextcloud und auf dem Rechner von dem die Daten stammen.<\/p>\n\n\n\n<p>Der Abgleich mit der Nextcloud l\u00e4uft auf beiden Rechnern alle 5 Minuten mit einer Windowsaufgabe (Aufgabenplaner), dadurch muss kein Windowsbenutzer angemeldet sein. <br><br>F\u00fcr die Synchronisation wird die &#8220;nextcloudcmd.exe&#8221; mit einer Batch verwendet.<br>Batchinhalt:<\/p>\n\n\n\n<p><code>\"C:\\Program Files\\Nextcloud\\nextcloudcmd.exe\" --path \/VerzeichnisWasAbgeglichenWerdenSoll --trust --non-interactive -s -u \"Benutzer Nextcloud\" -p BenutzerPasswort D:\\LokalesAblageverzeichnis https:\/\/DeineNextcloudServeradresse.com<\/code><br><\/p>\n\n\n\n<p class=\"has-large-font-size\">Fehlerbeschreibung<\/p>\n\n\n\n<p>Nun ist es so, dass diese Synchronisation selten einen Tag lang durchgelaufen ist und die Synchronisation sich aufh\u00e4ngt. Mir ist aufgefallen, dass folgende 3 versteckte Dateien im lokalen Synchronisationsverzeichnis lagen.<br>Wenn man diese l\u00f6scht und den Job neu startet l\u00e4uft der Abgleich wieder bis zum n\u00e4chsten Zwischenfall.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"625\" height=\"118\" src=\"https:\/\/marcusfranke.de\/wp-content\/uploads\/2021\/11\/2021-11-22-15_52_00-Nextcloud.png\" alt=\"\" class=\"wp-image-256\" srcset=\"https:\/\/markoschka.de\/wp-content\/uploads\/2021\/11\/2021-11-22-15_52_00-Nextcloud.png 625w, https:\/\/markoschka.de\/wp-content\/uploads\/2021\/11\/2021-11-22-15_52_00-Nextcloud-300x57.png 300w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/figure>\n\n\n\n<p class=\"has-large-font-size\">L\u00f6sung<\/p>\n\n\n\n<p>Die Datei mit der Endung *.db wird immer angelegt, <br>sobald die erste Synchronisation durchl\u00e4uft. <\/p>\n\n\n\n<p>Nun ist es so, dass die Nextcloudcmd.exe ein Problem damit hat, wenn bereits Daten kopiert wurden und beim n\u00e4chsten Abgleich keine Daten mehr auf der Nextcloud liegen.<\/p>\n\n\n\n<p>Besser Erkl\u00e4rt: <br>Lokal liegen Daten im Verzeichnis (welches Synchronisiert wird) und in der Nextcloud keine einzige Datei mehr und es wurde bereits einmal Synchronisiert (Versteckte Datei *.db wurde angelegt).<br><br>Sobald dieser Fall eintritt, werden die zwei weiteren versteckten Dateien (*.db-shm und *.db-wal) angelegt und ab da an  Funktioniert die Synchronisation nicht mehr und kann nur noch \u00fcber das l\u00f6schen aller drei versteckten Dateien wieder gestartet werden. <\/p>\n\n\n\n<p>Die L\u00f6sung ist demnach recht einfach, es muss immer eine Datei auf der Nextcloud liegen bleiben, damit der Abgleich immer funktioniert. Ich habe einfach eine Textdatei in der Nextcloud im Synchronisationsverzeichnis angelegt welche ich nicht mehr anr\u00fchre und nun l\u00e4uft der Abgleich wie er sein sollte.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"534\" height=\"260\" src=\"https:\/\/marcusfranke.de\/wp-content\/uploads\/2021\/11\/1637588262475-794.png\" alt=\"\" class=\"wp-image-251\" srcset=\"https:\/\/markoschka.de\/wp-content\/uploads\/2021\/11\/1637588262475-794.png 534w, https:\/\/markoschka.de\/wp-content\/uploads\/2021\/11\/1637588262475-794-300x146.png 300w\" sizes=\"auto, (max-width: 534px) 100vw, 534px\" \/><\/figure>\n<div class=\"pdf24Plugin-cp\"> \t<form name=\"pdf24Form0\" method=\"post\" target=\"pdf24PopWin\" action=\"https:\/\/doc2pdf.pdf24.org\/wordpress.php\"><input type=\"hidden\" name=\"blogCharset\" value=\"Cw1x07UAAA==\" \/><input type=\"hidden\" name=\"blogPosts\" value=\"MwQA\" \/><input type=\"hidden\" name=\"blogUrl\" value=\"yygpKSi20tfPTSzKzi9OzshO1EtJBQA=\" \/><input type=\"hidden\" name=\"blogName\" value=\"800sys4vTs7ITgQA\" \/><input type=\"hidden\" name=\"blogValueEncoding\" value=\"gzdeflate base64\" \/><input type=\"hidden\" name=\"postId_0\" value=\"MzKxBAA=\" \/><input type=\"hidden\" name=\"postTitle_0\" value=\"80utKEnOyS9NUQiuzEvOKMrPyyxOLMnMzysuKMpPyknNTQUA\" \/><input type=\"hidden\" name=\"postLink_0\" value=\"yygpKSi20tfPTSzKzi9OzshO1EtJ1bcvsDUysQQA\" \/><input type=\"hidden\" name=\"postAuthor_0\" value=\"800sSi4tVnArSszLTgUA\" \/><input type=\"hidden\" name=\"postDateTime_0\" value=\"MzIwMtQ1NNQ1MlIwNLcyNLQyMAAA\" \/><input type=\"hidden\" name=\"postContent_0\" value=\"tVbtTtxGFP2fpxi5UgUV3i9YoARWCgWkVGkUlShIEVI0tu\/a0x2PVzNjluzz5Bn6K\/94sZ479i5eIE2UtEjLru3x\/TznnvvseD45V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Lkp8bTWOpocqxJlrGSmTH4Sabn8GMEv+huupUN6EXxnvjiJ9kfjSBSk8sKfRMPhYSScTdHxFjWltGntplaaGfUy6sNpCghgzPbrObtw\/dFgNOwPh+E7Hg7j0Sgejj+MRx8Gg3iNt97c5BFmB5xEnQRC6PFovB\/cOvIbnmcVijCTP+pXIMfFjvhvDce7g8Ht+CDYx89FFBqArGTtAfitUt7GocRH7H5+uy2Gg8ENwghXkeiDZk0\/v4VrrUp3B3g73dV6ep+bjEXll16WNGOxWUF4pmrK\/U4Ypq5KpG6IFCjwiE6BeA1WMX6\/Suj7ydROwCDk7b6DUxwc1qEdiCDYAtmE9LlWlmbVHNLvxaIO+sjEgdh0abAmyqwj07zmtKK3IVmK8k2NO+XZhrrYGfKx\/igUIMzJ9nBrEC67m8fWgjS45zY3FB9quh2ifCTDTXj4t4T0r9rCYfJpWAoZrrPHuRIxPDC\/9e7BTGo7GV5dNXG7t1LEy3UjOccLzAm2663yodihotyfsDLhA23Bnfu5Z9aDb4v9xK4oQ7ThYiH19tpns2QkaCZuCXFRmxkjJQT91EBuVqh1+jOJxvMSZio0slkzgZ52XlKzUOAWavNkeO2MxJrcDtImuQ1wMhlWiyyDFOtP2LZ4qQq6P8XVDnei2X4DMdaQUl9EkwCKVdIIyIpma0w2VqadcvQEL7Zhy259Nk7ewmwWHD1CDrD3b2qz7kGDybC3d+orDVZ7qG+zuoKhXxAZcD0sVKCuhtr+v4oy3t27V5TR\/uD7FWW4v3swPjwc7Y\/2Dsbxwa97X1GR4Q+oyJO+BHL5HuV4ZCyoxXBv\/1vkAj47chGuNuXiHw==\" \/><\/form> \t<div class=\"pdf24Plugin-cp-link\"> \t\t<a href=\"#\" onclick=\"var pdf24Win = window.open('about:blank', 'pdf24PopWin', 'resizable=yes,scrollbars=yes,width=600,height=250,left='+(screen.width\/2-300)+',top='+(screen.height\/3-125)+''); pdf24Win.focus(); document.pdf24Form0.submit(); if(typeof pdf24OnCreatePDF === 'function'){void(pdf24OnCreatePDF(this,pdf24Win));} return false;\">Download Artikel als PDF<\/a> \t<\/div> <\/div>","protected":false},"excerpt":{"rendered":"<p>Einer meiner Synchronisationsjobs hat immer wieder Probleme gemacht und sich abgeschossen. Da ich im Internet keine L\u00f6sung gefunden habe und selbst mehrere Tage dar\u00fcber gegr\u00fcbelt habe muss ich meine L\u00f6sung \u00fcber meinen Block mit Euch Teilen. Synchronisationsumgebung Ich Synchronisiere ein Verzeichnis in der Nextcloud mit zwei Windows Rechnern,dabei dient die<a class=\"moretag\" href=\"https:\/\/markoschka.de\/?p=249\"> Weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[31,33,32,34],"class_list":["post-249","post","type-post","status-publish","format-standard","hentry","category-edv","tag-nextcloud","tag-nextcloudcmd","tag-nextcloudcmd-exe","tag-owncloud"],"_links":{"self":[{"href":"https:\/\/markoschka.de\/index.php?rest_route=\/wp\/v2\/posts\/249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/markoschka.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/markoschka.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/markoschka.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/markoschka.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=249"}],"version-history":[{"count":2,"href":"https:\/\/markoschka.de\/index.php?rest_route=\/wp\/v2\/posts\/249\/revisions"}],"predecessor-version":[{"id":257,"href":"https:\/\/markoschka.de\/index.php?rest_route=\/wp\/v2\/posts\/249\/revisions\/257"}],"wp:attachment":[{"href":"https:\/\/markoschka.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/markoschka.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/markoschka.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}