From 4ddcb8f6d57dd61507300fe175d11e2e21294200 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Wed, 4 Sep 2013 17:14:18 +0200 Subject: [PATCH] Add unison config files --- scripts/unison_backup.sh | 19 +++++++++++-------- unison/default.prf | 14 ++++++++++++++ unison/home.prf | 14 ++++++++++++++ 3 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 unison/default.prf create mode 100644 unison/home.prf diff --git a/scripts/unison_backup.sh b/scripts/unison_backup.sh index 1af3714..f339df0 100755 --- a/scripts/unison_backup.sh +++ b/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 diff --git a/unison/default.prf b/unison/default.prf new file mode 100644 index 0000000..df0bc79 --- /dev/null +++ b/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 + diff --git a/unison/home.prf b/unison/home.prf new file mode 100644 index 0000000..57ff8bd --- /dev/null +++ b/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 +