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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
iml-backup
Commits
362c3e0a
Commit
362c3e0a
authored
2 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
prune and verify after dir handling
parent
708a2d97
No related branches found
No related tags found
1 merge request
!78
prune and verify after dir handling
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
plugins/transfer/duplicity.sh
+2
-7
2 additions, 7 deletions
plugins/transfer/duplicity.sh
plugins/transfer/restic.sh
+7
-11
7 additions, 11 deletions
plugins/transfer/restic.sh
transfer.sh
+0
-10
0 additions, 10 deletions
transfer.sh
with
9 additions
and
28 deletions
plugins/transfer/duplicity.sh
+
2
−
7
View file @
362c3e0a
...
@@ -174,9 +174,9 @@
...
@@ -174,9 +174,9 @@
fi
fi
}
}
#
forget
old data
#
prune
old data
# uses global vars from ../../transfer.sh
# uses global vars from ../../transfer.sh
function
t_backupDo
Forget
(){
function
t_backupDo
Prune
(){
echo
"--- FORGET some data"
echo
"--- FORGET some data"
cmd
=
"duplicity remove-older-than
$STORAGE_KEEP
--force
${
ARGS_DEFAULT
}
${
STORAGE_TARGETPATH
}
"
cmd
=
"duplicity remove-older-than
$STORAGE_KEEP
--force
${
ARGS_DEFAULT
}
${
STORAGE_TARGETPATH
}
"
echo
$cmd
echo
$cmd
...
@@ -187,11 +187,6 @@
...
@@ -187,11 +187,6 @@
t_rcCheckCleanup
$myrc
t_rcCheckCleanup
$myrc
}
}
# prune old data
# uses global vars from ../../transfer.sh
function
t_backupDoPrune
(){
echo
"--- PRUNE is not implemented yet for duplicity."
}
# verify backup data
# verify backup data
# uses global vars from ../../transfer.sh
# uses global vars from ../../transfer.sh
function
t_backupDoVerify
(){
function
t_backupDoVerify
(){
...
...
This diff is collapsed.
Click to expand it.
plugins/transfer/restic.sh
+
7
−
11
View file @
362c3e0a
...
@@ -170,11 +170,12 @@
...
@@ -170,11 +170,12 @@
echo
echo
}
}
# forget data
# uses global vars from ../../transfer.sh
function
t_backupDoForget
(){
echo
"--- FORGET some data"
# prune old data
# uses global vars from ../../transfer.sh
function
t_backupDoPrune
(){
# --------------------
echo
"--- FORGET (in all pathes of repository)"
local
_tag
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
tag"
)
local
_tag
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
tag"
)
local
_mycmd
=
"restic forget
\
local
_mycmd
=
"restic forget
\
...
@@ -182,7 +183,6 @@
...
@@ -182,7 +183,6 @@
--tag
$_tag
\
--tag
$_tag
\
--group-by paths,tags
\
--group-by paths,tags
\
--prune
\
--prune
\
--path
${
BACKUP_DIR
}
\
--cleanup-cache"
--cleanup-cache"
local
_keep
local
_keep
...
@@ -203,13 +203,9 @@
...
@@ -203,13 +203,9 @@
t_rcCheckCleanup
$_myrc
t_rcCheckCleanup
$_myrc
echo
echo
}
# prune old data
# uses global vars from ../../transfer.sh
function
t_backupDoPrune
(){
# --------------------
# --------------------
echo
"--- PRUNE"
echo
"--- PRUNE
(whole repository)
"
_mycmd
=
"restic prune
${
ARGS_DEFAULT
}
"
_mycmd
=
"restic prune
${
ARGS_DEFAULT
}
"
echo
$_mycmd
echo
$_mycmd
sleep
3
sleep
3
...
@@ -225,7 +221,7 @@
...
@@ -225,7 +221,7 @@
# uses global vars from ../../transfer.sh
# uses global vars from ../../transfer.sh
function
t_backupDoVerify
(){
function
t_backupDoVerify
(){
# --------------------
# --------------------
echo
"--- VERIFY"
echo
"--- VERIFY
(whole repository)
"
# 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"
_mycmd
=
"restic check
${
ARGS_DEFAULT
}
"
_mycmd
=
"restic check
${
ARGS_DEFAULT
}
"
...
...
This diff is collapsed.
Click to expand it.
transfer.sh
+
0
−
10
View file @
362c3e0a
...
@@ -405,16 +405,6 @@ function setAction(){
...
@@ -405,16 +405,6 @@ function setAction(){
touch
${
lastbackupfile
}
touch
${
lastbackupfile
}
fi
fi
# --- prune
if
[
$doPrune
-eq
0
]
;
then
echo
"SKIP forget data"
else
h3
"
`
date
`
FORGET data of
${
BACKUP_DIR
}
"
t_backupDoForget
echo
fi
echo
else
else
color warning
color warning
echo
"DIR SKIP
$mydir
... does not exist (no error)"
echo
"DIR SKIP
$mydir
... does not exist (no error)"
...
...
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