Western Live Duo compatible rsync

Répondre
hmi
Site Admin
Messages : 105
Enregistré le : sam. févr. 04, 2017 10:33 am

Western Live Duo compatible rsync

Message par hmi » sam. févr. 18, 2017 11:20 am

Passer le Western Live Duo en Raid 0

Puis activer le SSH
<!-- m --><a class="postlink" href="http://192.168.X.X/UI/ssh">http://192.168.X.X/UI/ssh</a><!-- m -->
Se connecter avec Putty en ssh avec le nom utilisateur : root et le password : welc0me
Se rendre dans le dossier : /etc/default/rsync
Puis éditer le fichier rsync avec la commande nano : nano rsync

Vous allez trouver le fichier suivant :
------------------------------------------------------------------------
# defaults file for rsync daemon mode

# start rsync in daemon mode from init.d script?
# only allowed values are &quot;true&quot;, &quot;false&quot;, and &quot;inetd&quot;
# Use &quot;inetd&quot; if you want to start the rsyncd from inetd,
# all this does is prevent the init.d script from printing a message
# about not starting rsyncd (you still need to modify inetd's config yourself).
RSYNC_ENABLE=false

# which file should be used as the configuration file for rsync.
# This file is used instead of the default /etc/rsyncd.conf
# Warning: This option has no effect if the daemon is accessed
# using a remote shell. When using a different file for
# rsync you might want to symlink /etc/rsyncd.conf to
# that file.
# RSYNC_CONFIG_FILE=

# what extra options to give rsync --daemon?
# that excludes the --daemon; that's always done in the init.d script
# Possibilities are:
# --address=123.45.67.89 (bind to a specific IP address)
# --port=8730 (bind to specified port; default 873)
RSYNC_OPTS=''

# run rsyncd at a nice level?
# the rsync daemon can impact performance due to much I/O and CPU usage,
# so you may want to run it at a nicer priority than the default priority.
# Allowed values are 0 - 19 inclusive; 10 is a reasonable value.
RSYNC_NICE=''

# Don't forget to create an appropriate config file,
# else the daemon will not start
-----------------------------------------------------------------------
Enregistrer le fichier avec ctrl-X

Modifier la ligne : RSYNC_ENABLE=false en RSYNC_ENABLE=true

Nous allons créer un fichier de configuration de rsync
Se rendre dans le dossier /etc pour revenir depuis l'emplacement « /etc/default/ »
utiliser : cd ..Créer le fichier en utilisant la commande : nano rsyncd.conf

Et taper les commandes ci-dessous dans le fichier
-----------------------------------------------------
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsync.log


[rsync]
path = /shares/rsync
uid = root
gid = share
read only = no
list = yes
auth users = root
secrets file = /etc/rsyncd.secrets
-------------------------------------------------------

Enregistrer le fichier avec ctrl-X

Créer un dossier partagé avec le nom « rsync » dans le Live Duo avec les droits publics.

Créer un fichier secret pour le mot de passe qui doit se trouver dans le répertoire /etc
Avec la commande nano : nano rsyncd.secrets

Taper dans le fichier :
--------------------------------------
root:root
---------------------------------------
Enregister le fichier avec ctrl-X

Donner les droit avec la commande chmod
Taper : chmod 600 rsyncd.secrets

Demarrer le service en tapant : /etc/init.d/rsync restart

Modifier le service afin de démarrer le service automatiquement avec la commande suivant :
dans le dossier /etc/rc2.d
ln -s ../init.d/rsync S91rsync

Fin

Répondre