Table des matières
A la recherche d'un outil permettant la synchronisation d'un répertoire local avec un site FTP distant je suis tombé sur ' sitecopy'.
Ce chapitre est un bref descriptif de son utilisation.
Pour initier le mirroir il est nécessaire de créer un répertoire dans lequel seront stockées les informations relatives au fichier synchronisés.
mkdir .sitecopy chmod 700 .sitecopy
Ensuite il nous faut créer le fichier de configuration de sitecopy (
sitecopyrc )
site LE_NOM_DU_SITE server LE_SERVEUR_FTP remote /.../LE_REP_DISTANT_SUR_LE_SERVEUR_FTP username USER_FTP local /../LE_REP_LOCAL_A_SYNCHRONIISER exclude un_repertoire exclude *.pdf
Maintenant il nous faut initier sitecopy:
sitecopy --rcfile=sitecopyrc --storepath=.sitecopy --init LE_NOM_DU_SITE
Et pour finir on lance la synchro:
sitecopy --rcfile=sitecopyrc --storepath=.sitecopy --update LE_NOM_DU_SITE;
Pour automatiser cette tâche, j'ai fais un petit Makefile, il suffit alors de lancer 'make' :)



Commentaires: