Browse Source

Add unison config files

master
Mathieu Maret 8 years ago
parent
commit
b612262c4a
  1. 19
      scripts/unison_backup.sh
  2. 14
      unison/default.prf
  3. 14
      unison/home.prf

19
scripts/unison_backup.sh

@ -1,11 +1,14 @@
unison_exe="/usr/bin/unison"
tmp_file=$(mktemp)
res=$(${unison_exe} -batch > ${tmp_file} 2>&1)
grep "Nothing to do: replicas have not changed since last sync" ${tmp_file} > /dev/null
file_sync=$?
if [ ! $file_sync == 0 ];
then
echo $(more ${tmp_file})
fi
for profile in $@;
do
res=$(${unison_exe} -batch $profile > ${tmp_file} 2>&1)
grep "Nothing to do: replicas have not changed since last sync" ${tmp_file} > /dev/null
file_sync=$?
if [ ! $file_sync == 0 ];
then
echo $(more ${tmp_file})
fi
done

14
unison/default.prf

@ -0,0 +1,14 @@
root = /srv/samba/Photos/
#j'indique le chemin du dossier distant
root = ssh://mathieu@tutabaga.hd.free.fr//srv/share/Photos
# Options pour booster Windows
#fastcheck = true
# Options du journal
log = true
logfile = /home/mathieu/.unison/logunison
#zap les permissions
perms = 0

14
unison/home.prf

@ -0,0 +1,14 @@
root = /home/mathieu/
#j'indique le chemin du dossier distant
root = ssh://mathieu@tutabaga.hd.free.fr//srv/share/mathieu/
path=mathieu/pass/
# Options pour booster Windows
#fastcheck = true
# Options du journal
log = true
logfile = /home/mathieu/.unison/logunison_math
#zap les permissions
perms = 0
Loading…
Cancel
Save