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:33] – [Introduction] fragglefr:cs:unison [2021/12/27 18:25] (Version actuelle) – modification externe 127.0.0.1
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 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 135: Ligne 138:
  
 <code bash> <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.1414506820.txt.gz
  • Dernière modification : il y a 2 ans
  • (modification externe)