Beim Versuch mehrere Ordner auf verschiedenen Computern synchron zu halten bin ich über OwnCloud gestolpert.
(http://wiki.qnap.com/wiki/Category:OwnCloud). Für grosse Ordner war es sehr langsam.
Aus diesem Grund habe ich SparkleShare ausprobiert, was wesentlich schneller war.
Mittlerweile bietet Qnap QSync, was ich noch nicht ausprobiert habe.
Hier der Weg wie ich SparkleShare installiert habe.
Auf den Client Computern:
Den Client von sparkleshare.org herunterladen und installieren.
Nach der Installation befindet sich im SparkleShare opdner die Datei "users link code.txt", welche auf das NAS in den Ordner /share/Public kopiert werden muss.
Server:
Um das QNAP Gerät als Server zu benutzen muss Git installiert werden und eine Schlüsselbasierte ssh Verbindung eingerichtet werden.
Der QNAP ssh Server erlubt nur dem Benutzer Admin das einloggen via ssh. Das war für mich ausreichend, wer mehrere Benutzer haben will
sollte sich OpenSSH ansehen( http://wiki.qnap.com/wiki/How_To_Replac ... th_OpenSSH)
Voraussetztung dafür ist das Optware auf dem NAS installiert ist!
Verbinde dich mit ssh mit dem QNAP Gerät
Von einem Linux Recher aus, vom Windows Rechner aus mit PuttY (http://www.putty.org)
Wenn man mit dem NAS verbunden ist
eingeben um git zu instllieren.
Um eine schlüsselloses Login zu ermöglichen muss der Link Code vom SparkleShare Ordner zur authorized_keys Datei des logun Benutzers (hier Admin/root) hinzugefügt werden.
Dann muss ein Share erzeugt werden, wo die Daten gespeichert werden sollen. (bei mir: /share/Git)
Repositories können mit dem Script dazzle.sh von der SparkleShare Seite erzeugt werden.
Wegen den eingeschränkten möglicheiten des NAS habe ich das Script auf das nötigste abgespeckt.
Kopiere das unten angehängte Script zum NAS.(share/Public)
Mache es mit
ausführbar und lege mit
ein Repository auf dem Server an
#save me as dazzle.sh
#!/bin/bash
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The ** You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
# Check if we're root, if not show a warning
if [[ $UID -ne 0 ]]; then
case $1 in
""|help) # You should be allowed to check the help without being
root
;;
*)
echo "Sorry, but Dazzle needs to be run as root."
exit 1
;;
esac
fi
GIT=`which git`
# Define text styles
BOLD=`tput bold`
NORMAL=`tput sgr0`
# Nice defaults
DAZZLE_USER="admin"
DAZZLE_GROUP="administrators"
DAZZLE_HOME="/share/Git"
show_help () {
echo "${BOLD}Dazzle, SparkleShare host setup script${NORMAL}"
echo "This script needs to be run as root"
echo
echo "Usage: dazzle [COMMAND]"
echo
echo " create PROJECT_NAME creates a SparkleShare project called PROJECT_NAME"
echo " create-encrypted PROJECT_NAME creates an encrypted SparkleShare project"
echo
}
create_project () {
if [ -f "$DAZZLE_HOME/$1/HEAD" ]; then
echo " -> Project \"$1\" already exists."
echo
else
# Create the Git repository
echo " -> $GIT init --bare $DAZZLE_HOME/$1"
$GIT init --quiet --bare $DAZZLE_HOME/$1
# Don't allow force-pushing and data to get lost
echo " -> $GIT config --file $DAZZLE_HOME/$1/config receive.denyNonFastForwards true"
$GIT config --file $DAZZLE_HOME/$1/config receive.denyNonFastForwards true
# Add list of files that Git should not compress
EXTENSIONS="jpg jpeg png tiff gif flac mp3 ogg oga avi mov mpg mpeg mkv ogv ogx webm zip gz bz bz2 rpm deb tgz rar ace 7z pak iso"
for EXTENSION in $EXTENSIONS; do
sleep 0.05
echo -ne " -> echo \"*.$EXTENSION -delta\" >> $DAZZLE_HOME/$1/info/attributes \r"
echo "*.$EXTENSION -delta" >> $DAZZLE_HOME/$1/info/attributes
sleep 0.05
EXTENSION_UPPERCASE=`echo $EXTENSION | tr '[:lower:]' '[:upper:]'`
echo -ne " -> echo \"*.$EXTENSION_UPPERCASE -delta\" >> $DAZZLE_HOME/$1/info/attributes \r"
echo "*.$EXTENSION_UPPERCASE -delta" >> $DAZZLE_HOME/$1/info/attributes
done
echo ""
# Set the right permissions
echo " -> chown --recursive $DAZZLE_USER:$DAZZLE_GROUP $DAZZLE_HOME"
chown --recursive $DAZZLE_USER:$DAZZLE_GROUP $DAZZLE_HOME
sleep 0.5
echo
echo "${BOLD}Project \"$1\" was successfully created.${NORMAL}"
fi
# Fetch the external IP address
IP=`curl --silent http://ifconfig.me/ip`
PORT=`grep "^Port " /etc/ssh/sshd_config | cut --bytes=6-`
# Display info to link with the created project to the user
echo "To link up a SparkleShare client, enter the following"
echo "details into the ${BOLD}\"Add Hosted Project...\"${NORMAL} dialog: "
echo
echo " Address: ${BOLD}ssh://$DAZZLE_USER@$IP:$PORT${NORMAL}"
echo " Remote Path: ${BOLD}$DAZZLE_HOME/$1${NORMAL}"
echo
echo "To link up (more) computers, use the \"dazzle link\" command."
echo
}
# Parse the command line arguments
case $1 in
create)
echo "${BOLD}Creating project \"$2\"...${NORMAL}"
create_project $2
;;
create-encrypted)
echo "${BOLD}Creating encrypted project \"$2\"...${NORMAL}"
create_project $2-crypto
;;
*|help)
show_help
;;
esac
Alles anzeigen
Nun sollte es möglich sein mit dem SparkleShare Programm des PCs auf den QNAP Server zuzugreifen.