Skip to content
Snippets Groups Projects
Commit 22092a1a authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch 'fix-no-cache' into 'master'

add restic prune

See merge request !73
parents eff9b8b2 30599cab
No related branches found
No related tags found
1 merge request!73add restic prune
# IML BACKUP # # IML BACKUP #
Backup scripts using restic (or duplicity). Backup scripts using Restic (or Duplicity).
Runs on Linux: CentOS, Debian, Manjaro, Ubuntu. Runs on Linux: CentOS, Debian, Manjaro, Ubuntu.
* Free software. GNU GPL 3.0 📄 Source: <https://git-repo.iml.unibe.ch/iml-open-source/iml-backup/> \
* Source: <https://git-repo.iml.unibe.ch/iml-open-source/iml-backup/> 📜 License: GNU GPL 3.0 \
📖 Docs: <https://os-docs.iml.unibe.ch/iml-backup/>
Supported backup clients:
* Restic: <https://restic.net/> * Restic: <https://restic.net/>
* Duplicity: <https://duplicity.gitlab.io/duplicity-web/> * Duplicity: <https://duplicity.gitlab.io/duplicity-web/>
......
# IML BACKUP # # IML BACKUP #
Backup scripts using restic (or duplicity). Backup scripts using Restic (or Duplicity).
Runs on Linux: CentOS, Debian, Manjaro, Ubuntu. Runs on Linux: CentOS, Debian, Manjaro, Ubuntu.
* Free software. GNU GPL 3.0 📄 Source: <https://git-repo.iml.unibe.ch/iml-open-source/iml-backup/> \
* Source: <https://git-repo.iml.unibe.ch/iml-open-source/iml-backup/> 📜 License: GNU GPL 3.0 \
📖 Docs: see [docs](./docs) folder or online <https://os-docs.iml.unibe.ch/iml-backup/>
Supported backup clients:
* Restic: <https://restic.net/> * Restic: <https://restic.net/>
* Duplicity: <https://duplicity.gitlab.io/duplicity-web/> * Duplicity: <https://duplicity.gitlab.io/duplicity-web/>
......
/* /*
patch css elements of daux.io blue theme patch css elements of daux.io blue theme
version 2022-04-22 version 2022-05-13
*/ */
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
--h1: rgba(40,60,80,0.8); --h1: rgba(40,60,80,0.8);
--h1-bottom: 1px solid rgba(40,60,80,0.1); --h1-bottom: 1px solid rgba(40,60,80,0.1);
--h2: rgba(40,60,80,0.5); --h2: #468;
--h3: rgba(40,60,80,0.3); --h3: #579;
} }
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
# 2022-02-09 ah v0.3 update pruning; more keep-params # 2022-02-09 ah v0.3 update pruning; more keep-params
# 2022-03-07 ah v0.4 add verify in post task # 2022-03-07 ah v0.4 add verify in post task
# 2022-05-10 ah v0.5 fix handling with nocache flag (use globally as default param - not in backup only) # 2022-05-10 ah v0.5 fix handling with nocache flag (use globally as default param - not in backup only)
# 2022-05-16 ah v0.6 added restic prune
# ================================================================================ # ================================================================================
# -------------------------------------------------------------------------------- # --------------------------------------------------------------------------------
...@@ -148,6 +149,7 @@ ...@@ -148,6 +149,7 @@
# uses global vars from ../../transfer.sh # uses global vars from ../../transfer.sh
function t_backupDoPostTasks(){ function t_backupDoPostTasks(){
# --------------------
echo "--- UNLOCK ... just in case :-)" echo "--- UNLOCK ... just in case :-)"
echo restic unlock ${ARGS_DEFAULT} echo restic unlock ${ARGS_DEFAULT}
color cmd color cmd
...@@ -155,7 +157,8 @@ ...@@ -155,7 +157,8 @@
color reset color reset
echo echo
echo "--- PRUNE" # --------------------
echo "--- FORGET some data"
local _tag=$( _j_getvar ${STORAGEFILE} "${CFGPREFIX}tag") local _tag=$( _j_getvar ${STORAGEFILE} "${CFGPREFIX}tag")
local _mycmd="restic forget \ local _mycmd="restic forget \
...@@ -184,6 +187,20 @@ ...@@ -184,6 +187,20 @@
t_rcCheckCleanup $_myrc t_rcCheckCleanup $_myrc
echo echo
# --------------------
echo "--- PRUNE"
_mycmd="restic prune ${ARGS_DEFAULT}"
echo $_mycmd
sleep 3
color cmd
eval $_mycmd
local _myrc=$?
color reset
t_rcCheckPrune $_myrc
echo
# --------------------
echo "--- VERIFY" echo "--- VERIFY"
# param --read-data takes a long time. Maybe use an extra job with it. # param --read-data takes a long time. Maybe use an extra job with it.
# _mycmd="time restic check ${ARGS_DEFAULT} --with-cache --read-data" # _mycmd="time restic check ${ARGS_DEFAULT} --with-cache --read-data"
...@@ -377,6 +394,16 @@ ...@@ -377,6 +394,16 @@
} }
# verify backup data # verify backup data
# param integer exitcode of command # param integer exitcode of command
function t_rcCheckPrune(){
echo -n "__PRUNE__ "
case $1 in
0) color ok; echo "OK" ;;
*) color error; echo "FAILED - returncode was $1" ;;
esac
color reset
}
# verify backup data
# param integer exitcode of command
function t_rcCheckVerify(){ function t_rcCheckVerify(){
echo -n "__VERIFY__ " echo -n "__VERIFY__ "
case $1 in case $1 in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment