fr:cs:unison

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
fr:cs:unison [2014/10/28 15:31] – [logrotate] fragglefr:cs:unison [2021/12/27 18:25] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 ====== Introduction ====== ====== Introduction ======
  
-Documentation de la mise en place d'une synchronisation de fichiers bi-directionnelle avec [[http://www.cis.upenn.edu/~bcpierce/unison/|Unison]] sous Debian-like GNU/Linux distribution.  +Documentation de la mise en place d'une synchronisation de fichiers bi-directionnelle avec [[http://www.cis.upenn.edu/~bcpierce/unison/|Unison]] sous des distributions GNU/Linux Debian-like .  
  
 ====== Installation ====== ====== Installation ======
Ligne 8: Ligne 8:
  
 <code bash> <code bash>
-sudo apt-get install unison-all+sudo apt-get install unison-all rsync
 </code> </code>
  
 ====== Configuration ====== ====== Configuration ======
    
 +Générez une paire de clés SSH sans passphrase pour le compte root ayant pour longueur 3072 bits. 
 +
 +Sur une seule des deux machines, effectuez : 
 ===== Unison ===== ===== Unison =====
  
Ligne 28: Ligne 31:
 </code> </code>
  
-<code>+<code bash>
 --- 8< --- /root/.unison/default.prf --- 8< --- /root/.unison/default.prf
 # Common options # Common options
Ligne 56: Ligne 59:
 backup = Name * backup = Name *
 backuplocation = central backuplocation = central
-backupdir = /mnt/Volume00/backups/unison+backupdir = /home/.unison-backups
  
 #          When set to true, this flag causes the user interface to skip #          When set to true, this flag causes the user interface to skip
Ligne 71: Ligne 74:
 batch=true batch=true
  
-#          !When this is set to true, Unison will request an extra+#          When this is set to true, Unison will request an extra
 #          confirmation if it appears that the entire replica has been #          confirmation if it appears that the entire replica has been
 #          deleted, before propagating the change. If the batch flag is #          deleted, before propagating the change. If the batch flag is
Ligne 134: Ligne 137:
 ===== cronjob ===== ===== cronjob =====
  
-<code>+<code bash> 
 +sudo mkdir /var/lock/unison 
 --- 8< --- /etc/cron.d/unison --- 8< --- /etc/cron.d/unison
-*/5 * * * * root flock -n /var/lock/unison/cron.lock -c /usr/bin/unison &> /root/unison-cron.log+*/5 * * * * root [ ! -d /var/lock/unison ] && mkdir /var/lock/unison; flock -n /var/lock/unison/cron.lock -c /usr/bin/unison &> /root/unison-cron.log
 --- >8 --- --- >8 ---
 </code> </code>
  
 +With a run control file :
 +
 +<code bash>
 +sudo mkdir /var/lock/unison
 +
 +--- 8< --- /etc/cron.d/unison
 +*/5 * * * * root [ ! -d /var/lock/unison ] && mkdir /var/lock/unison;  [ -e /etc/unison.sync ] && flock -n /var/lock/unison/cron.lock -c /usr/bin/unison &> /root/unison-cron.log
 +--- >8 ---
 +</code>
 ===== logrotate ===== ===== logrotate =====
 <code bash>  <code bash> 
Ligne 145: Ligne 159:
 /var/log/unison.log { /var/log/unison.log {
         notifempty         notifempty
 +        copytruncate
         daily         daily
         rotate 7         rotate 7
Ligne 151: Ligne 166:
         delaycompress         delaycompress
 } }
 +--- >8 ---
 </code> </code>
  • fr/cs/unison.1414506717.txt.gz
  • Dernière modification : il y a 2 ans
  • (modification externe)