Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iml-backup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
iml-backup
Commits
22092a1a
Commit
22092a1a
authored
3 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Plain Diff
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
!73
add restic prune
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+7
-3
7 additions, 3 deletions
README.md
docs/_index.md
+7
-3
7 additions, 3 deletions
docs/_index.md
docs/style.css
+4
-4
4 additions, 4 deletions
docs/style.css
plugins/transfer/restic.sh
+28
-1
28 additions, 1 deletion
plugins/transfer/restic.sh
with
46 additions
and
11 deletions
README.md
+
7
−
3
View file @
22092a1a
# IML BACKUP #
# IML BACKUP #
Backup scripts using
r
estic (or
d
uplicity).
Backup scripts using
R
estic (or
D
uplicity).
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/>
...
...
This diff is collapsed.
Click to expand it.
docs/_index.md
+
7
−
3
View file @
22092a1a
# IML BACKUP #
# IML BACKUP #
Backup scripts using
r
estic (or
d
uplicity).
Backup scripts using
R
estic (or
D
uplicity).
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/>
...
...
This diff is collapsed.
Click to expand it.
docs/style.css
+
4
−
4
View file @
22092a1a
/*
/*
patch css elements of daux.io blue theme
patch css elements of daux.io blue theme
version 2022-0
4-22
version 2022-0
5-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
;
}
}
...
...
This diff is collapsed.
Click to expand it.
plugins/transfer/restic.sh
+
28
−
1
View file @
22092a1a
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment