{"id":184,"date":"2014-10-04T10:01:03","date_gmt":"2014-10-04T10:01:03","guid":{"rendered":"http:\/\/192.168.2.32:8082\/?p=184"},"modified":"2019-01-03T10:13:15","modified_gmt":"2019-01-03T10:13:15","slug":"alfresco-sync-mit-edrive","status":"publish","type":"post","link":"https:\/\/www.dev-metal.ch\/?p=184","title":{"rendered":"Alfresco Sync mit eDrive"},"content":{"rendered":"<p><!--more-->EDrive ist ein Sync-Server, der mittels CMIS Alfresco-Repositories mit einem lokalen Desktop-PC synchronisieren kann. Siehe <a href=\"http:\/\/sourceforge.net\/projects\/eoss-edrive\/?source=directory\" target=\"_blank\">http:\/\/sourceforge.net\/projects\/eoss-edrive\/?source=directory<\/a><\/p>\n<p>Mittlerweile hat sich aber herausgestellt, dass der Entwickler von eDrive die Entwicklung nicht fortsetzt. Auch hat eDrive einige schw\u00e4chen wenn es um die Synchronisation auf mehrere verschiedene Endger\u00e4te geht. EDrive eignet sich nach meinen gemachten Erfahrungen lediglich dazu, das Alfresco-Repository auf <strong>EIN<\/strong> Endger\u00e4t zu synchronisieren.<\/p>\n<h1>Installation und Konfiguration von eDrive<\/h1>\n<ul>\n<li>eDrive herunterladen <a href=\"http:\/\/sourceforge.net\/projects\/eoss-edrive\/?source=directory\" target=\"_blank\">http:\/\/sourceforge.net\/projects\/eoss-edrive\/?source=directory<\/a><\/li>\n<li>Zip entpacken und an die gew\u00fcnschte Installations-Stelle verschieben<\/li>\n<li>\n<pre class=\"lang:default decode:true \">..\/bin<\/pre>\n<p>beinhaltet die Start-Scripts f\u00fcr Windows und Linux<\/li>\n<li>\n<pre class=\"lang:default decode:true \">..\/config<\/pre>\n<p>beinhaltet alle konfig-Files inkl. Dokumentation<\/li>\n<li>\n<pre class=\"lang:default decode:true \">..\/lib<\/pre>\n<p>beinhaltet alle java-klassen<\/li>\n<\/ul>\n<h2>Konfiguration<\/h2>\n<p>Als erstes muss eDrive konfiguriert werden. Dazu editieren wir die Datei<\/p>\n<pre class=\"lang:default decode:true \">..\/config\/eDrive.pass<\/pre>\n<p>einen Passphrase erfassen<\/p>\n<pre class=\"lang:default decode:true\">..\/config\/eDrive.json<\/pre>\n<p>Die genauen Konfigurations-M\u00f6glichkeiten bitte dem readme entnehmen<\/p>\n<p>Beispiel:<br \/>\nHier werden zwei Verzeichnisse des Alfresco-Repositories Bi-Direktional gesyncht.<\/p>\n<ul>\n<li>&#8222;\/Benutzer-Homes\/user\/folder&#8220; nach &#8222;D:\/sync&#8220;<\/li>\n<li>&#8222;\/Sites\/office\/documentLibrary\/Transfer&#8220; nach &#8222;D:\/transfer&#8220;<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true \">{\r\n    \"edrive\": [\r\n        {\r\n            \"unfilingSupported\": false,\r\n            \"repositoryRoot\": \"\\\\Benutzer-Homes\\\\user\\\\folder\",\r\n            \"repositoryPassword\": \"passwort\",\r\n            \"outboundSyncSeconds\": 20,\r\n            \"syncDirection\": \"BI_DIRECTIONAL\",\r\n            \"repositoryUrl\": \"http:\/\/server.ch\/alfresco\/cmisws\",\r\n            \"repositoryId\":\"564e78b1-5c15-14b8-513s-12354f1567s4\",\r\n            \"repositoryUserName\": \"ralph\",\r\n            \"paths\": [\r\n                {\r\n                    \"syncing\": true,\r\n                    \"path\": \"\"\r\n                }\r\n            ],\r\n            \"ignorePatterns\": [\r\n                {\"base64\":\"LipbXFxcL11cLnN2bltcXFwvXS4q\"},\r\n                {\"base64\":\"LipbXFxcL11cLnN2bg==\"}\r\n            ],\r\n            \"name\": \"My Sync\",\r\n            \"fileSystemRoot\": \"D:\\\\sync\",\r\n        }\r\n        {\r\n            \"unfilingSupported\": false,\r\n            \"repositoryRoot\": \"\\\\Sites\\\\office\\\\documentLibrary\\\\Transfer\",\r\n            \"repositoryPassword\": \"passwort\",\r\n            \"outboundSyncSeconds\": 20,\r\n            \"syncDirection\": \"BI_DIRECTIONAL\",\r\n            \"repositoryUrl\": \"http:\/\/server.ch\/alfresco\/cmisws\",\r\n            \"repositoryId\":\"564e78b1-5c15-14b8-513s-12354f1567s4\",\r\n            \"repositoryUserName\": \"user\",\r\n            \"paths\": [\r\n                {\r\n                    \"syncing\": true,\r\n                    \"path\": \"\"\r\n                }\r\n            ],\r\n            \"ignorePatterns\": [\r\n                {\"base64\":\"LipbXFxcL11cLnN2bltcXFwvXS4q\"},\r\n                {\"base64\":\"LipbXFxcL11cLnN2bg==\"}\r\n            ],\r\n            \"name\": \"My Transfer\",\r\n            \"fileSystemRoot\": \"D:\\\\transfer\",\r\n        }\r\n    ]\r\n}<\/pre>\n<h2>Start<\/h2>\n<p>Wenn eDrive installiert und konfiguriert ist, kann diese \u00fcber<\/p>\n<pre class=\"lang:default decode:true \">..\/bin\/edrive.bat<\/pre>\n<p>gestartet werden.<\/p>\n<h1>Installation Windows Service<\/h1>\n<p>Damit eDrive bei jedem Windows-Start gleich mit gestatet wird, muss eDrive als Service installiert werden. Dazu verwende ich <a href=\"http:\/\/commons.apache.org\/proper\/commons-daemon\/procrun.html\" target=\"_blank\">Apache Commons Deamon<\/a>. Commons Deamon liefert einen Wrapper, der beim Windows-Start ein Java-Programm ausf\u00fchren kann. Dazu muss der Wrapper als Service installiert werden:<\/p>\n<ul>\n<li>Download Apache Commons Deamon: <a href=\"http:\/\/commons.apache.org\/proper\/commons-daemon\/download_daemon.cgi\" target=\"_blank\">http:\/\/commons.apache.org\/proper\/commons-daemon\/download_daemon.cgi<\/a><\/li>\n<li>Entpacken und prunsrv.exe in das Installationsverzeichnis von eDrive\n<pre class=\"lang:default decode:true \">..\/bin<\/pre>\n<p>kopieren<\/li>\n<li>in ..\/bin eine weitere bat-Datei &#8222;RegisterService&#8220; erstellen und mit folgendem bef\u00fcllen\n<pre class=\"lang:default decode:true\">prunsrv.exe \/\/IS\/\/eDrive --Install=\"C:\\pfad\\prunsrv.exe\" --Jvm=auto --Startup=auto --StartMode=jvm --Classpath=\".\/;..\/lib\/*;..\/config\" --StartClass=com.eossonline.edrive.service.EDrive --JvmOptions=-javaagent:..\/lib\/aspectjweaver-1.7.2.jar ++JvmOptions=-Dorg.slf4j.simpleLogger.defaultLogLevel=debug ++JvmOptions=-Dedrive.config.file=..\/config\/eDrive.json ++JvmOptions=-Dedrive.server.port=4444 ++JvmOptions=-Dedrive.passphrase.file=..\/config\/eDrive.pass ++JvmOptions=-Dedrive.multicast.ip=224.0.0.1 ++JvmOptions=-Dedrive.multicast.port=4445 --DisplayName=\"eDriveService\"<\/pre>\n<\/li>\n<li>Das ausf\u00fchren der Bat-Datei registriert eDrive als Service (eDriveService) und ist ab sofort unter &#8222;Dienste&#8220; verf\u00fcgbar.<\/li>\n<li>Unter ..\/bin eine weitere bat-Datei &#8222;UnRegisterService&#8220; und mit folgenden Inhalt bef\u00fcllen:\n<pre class=\"lang:default decode:true\">prunsrv.exe \/\/DS\/\/eDrive<\/pre>\n<\/li>\n<li>Dies meldet den Service unter den Windows-Diensten wieder ab.<\/li>\n<\/ul>\n<h1>Installation Linux Deamon<\/h1>\n<ul>\n<li>Start-Script f\u00fcr init.d erstellen:<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true\">#!\/bin\/sh\r\n\r\n# $Id: $\r\n# \/etc\/init.d\/edrive: start edrive and stop edrive\r\nset -e\r\n\r\n# include init functions so we can use functions like\r\n# log_daemon_msg to output messages instead of echo\r\n. \/lib\/lsb\/init-functions\r\n\r\n# Date\r\nNOW=$(date +\"%Y-%m-%d\")\r\n# Logfile\r\nLOGFILE=\"edrive-$NOW.log\"\r\n\r\n# start method\r\nstart_edrive() {\r\nlog_daemon_msg \u201cStarting edrive\u2026\u201c\r\ncd \/home\/ralwet\/myPrograms\/edrive-0.1.3\/bin\r\n# .\/edrive.sh &gt;&gt; \/home\/ralwet\/myPrograms\/edrive-0.1.3\/$LOGFILE\r\n.\/edrive.sh\r\nreturn\r\n}\r\n\r\n# stop method\r\nstop_edrive() {\r\nlog_daemon_msg \u201cStopping edrive\u2026\u201c\r\njps -l | grep com.eossonline.edrive.service.EDrive | cut -d ' ' -f 1 | xargs -rn1 kill\r\nreturn\r\n}\r\n\r\n# now let run the functions\r\ncase \"$1\" in\r\nstart)\r\nstart_edrive\r\n;;\r\nstop)\r\nstop_edrive\r\n;;\r\nrestart)\r\nstop_edrive\r\nsleep 10\r\nstart_edrive\r\n;;\r\n*)\r\nlog_daemon_msg \u201cUsage:{start|stop|restart}\u201c\r\nexit 1\r\n;;\r\nesac\r\nexit 0<\/pre>\n<ul>\n<li>Mit Ausf\u00fchr-Rechten nach\n<pre class=\"lang:default decode:true \">\/etc\/init.d\/edrive<\/pre>\n<p>kopieren<\/li>\n<li>Deamon mit\n<pre class=\"lang:default decode:true\">sudo update-rc.d edrive defaults<\/pre>\n<p>registrieren.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[4,35],"tags":[15],"class_list":["post-184","post","type-post","status-publish","format-standard","hentry","category-alfresco","category-java","tag-java"],"modified_by":"ralph","_links":{"self":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts\/184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=184"}],"version-history":[{"count":6,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts\/184\/revisions"}],"predecessor-version":[{"id":190,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts\/184\/revisions\/190"}],"wp:attachment":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}