From 26970ab687ba925ea407d5354a302b99b687559a Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sat, 17 Oct 2020 09:40:51 +0200 Subject: Added Zim Notebook backup --- duply/.duply/seb_admin/conf | 12 ++++++++++++ duply/.duply/seb_admin/exclude | 9 +++++++++ duply/.duply/seb_notebook/conf | 12 ++++++++++++ duply/.duply/seb_notebook/exclude | 10 ++++++++++ duply/scripts/duplicity/duply_common.sh | 7 ++++++- 5 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 duply/.duply/seb_admin/conf create mode 100644 duply/.duply/seb_admin/exclude create mode 100644 duply/.duply/seb_notebook/conf create mode 100644 duply/.duply/seb_notebook/exclude diff --git a/duply/.duply/seb_admin/conf b/duply/.duply/seb_admin/conf new file mode 100644 index 0000000..749f4cf --- /dev/null +++ b/duply/.duply/seb_admin/conf @@ -0,0 +1,12 @@ +# base directory to backup +SOURCE='/home/sebastien/adminstratifs/' + +# Storage directory +export STORAGE_NAME="seb_administratif" +export PCA_OS_REGION_NAME=GRA +export HOT_OS_REGION_NAME=GRA + +GPG_KEYS_ENC='2421BCBD56473645,933FFFBA5E8867338DF2FF645E23E7695299F9AB' +GPG_KEY_SIGN='F6859BC3CC712DF8' + +. ~/scripts/duplicity/duply_common.sh diff --git a/duply/.duply/seb_admin/exclude b/duply/.duply/seb_admin/exclude new file mode 100644 index 0000000..9558c66 --- /dev/null +++ b/duply/.duply/seb_admin/exclude @@ -0,0 +1,9 @@ +# although called exclude, this file is actually a globbing file list +# duplicity accepts some globbing patterns, even including ones here +# here is an example, this incl. only 'dir/bar' except it's subfolder 'foo' +# - dir/bar/foo +# + dir/bar +# - ** +# for more details see duplicity manpage, section File Selection +# http://duplicity.nongnu.org/duplicity.1.html#sect9 + diff --git a/duply/.duply/seb_notebook/conf b/duply/.duply/seb_notebook/conf new file mode 100644 index 0000000..55b3df7 --- /dev/null +++ b/duply/.duply/seb_notebook/conf @@ -0,0 +1,12 @@ +# base directory to backup +SOURCE='/home/sebastien/Notebooks/' + +# Storage directory +export STORAGE_NAME="seb_notebooks" +export PCA_OS_REGION_NAME=GRA +export HOT_OS_REGION_NAME=GRA + +GPG_KEYS_ENC='2421BCBD56473645,933FFFBA5E8867338DF2FF645E23E7695299F9AB' +GPG_KEY_SIGN='F6859BC3CC712DF8' + +. ~/scripts/duplicity/duply_common.sh diff --git a/duply/.duply/seb_notebook/exclude b/duply/.duply/seb_notebook/exclude new file mode 100644 index 0000000..1a7a4ad --- /dev/null +++ b/duply/.duply/seb_notebook/exclude @@ -0,0 +1,10 @@ +# although called exclude, this file is actually a globbing file list +# duplicity accepts some globbing patterns, even including ones here +# here is an example, this incl. only 'dir/bar' except it's subfolder 'foo' +# - dir/bar/foo +# + dir/bar +# - ** +# for more details see duplicity manpage, section File Selection +# http://duplicity.nongnu.org/duplicity.1.html#sect9 + +- **/.git diff --git a/duply/scripts/duplicity/duply_common.sh b/duply/scripts/duplicity/duply_common.sh index a1a8866..a55bfd6 100644 --- a/duply/scripts/duplicity/duply_common.sh +++ b/duply/scripts/duplicity/duply_common.sh @@ -17,7 +17,12 @@ function gpg_sec_avail { read() { if command -v zenity &> /dev/null then - eval $2=$(zenity --password) + RESULT=$(zenity --password 2>/dev/null) + if [ $? -ne 0 ]; then + command read $* + else + eval $2=${RESULT} + fi else command read $* fi -- cgit v1.2.3