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
708a2d97
Commit
708a2d97
authored
2 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
prune and verify are non directory based
parent
e810ca2d
No related branches found
No related tags found
1 merge request
!77
prune and verify are non directory based
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
plugins/transfer/duplicity.sh
+7
-2
7 additions, 2 deletions
plugins/transfer/duplicity.sh
plugins/transfer/restic.sh
+8
-4
8 additions, 4 deletions
plugins/transfer/restic.sh
transfer.sh
+26
-15
26 additions, 15 deletions
transfer.sh
with
41 additions
and
21 deletions
plugins/transfer/duplicity.sh
+
7
−
2
View file @
708a2d97
...
@@ -174,9 +174,9 @@
...
@@ -174,9 +174,9 @@
fi
fi
}
}
#
prune
old data
#
forget
old data
# uses global vars from ../../transfer.sh
# uses global vars from ../../transfer.sh
function
t_backupDo
Prune
(){
function
t_backupDo
Forget
(){
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,6 +187,11 @@
...
@@ -187,6 +187,11 @@
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
+
8
−
4
View file @
708a2d97
...
@@ -170,11 +170,10 @@
...
@@ -170,11 +170,10 @@
echo
echo
}
}
# forget data
# prune old data
# uses global vars from ../../transfer.sh
# uses global vars from ../../transfer.sh
function
t_backupDo
Prune
(){
function
t_backupDo
Forget
(){
# --------------------
echo
"--- FORGET some data"
echo
"--- FORGET some data"
local
_tag
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
tag"
)
local
_tag
=
$(
_j_getvar
${
STORAGEFILE
}
"
${
CFGPREFIX
}
tag"
)
...
@@ -183,6 +182,7 @@
...
@@ -183,6 +182,7 @@
--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,6 +203,10 @@
...
@@ -203,6 +203,10 @@
t_rcCheckCleanup
$_myrc
t_rcCheckCleanup
$_myrc
echo
echo
}
# prune old data
# uses global vars from ../../transfer.sh
function
t_backupDoPrune
(){
# --------------------
# --------------------
echo
"--- PRUNE"
echo
"--- PRUNE"
...
...
This diff is collapsed.
Click to expand it.
transfer.sh
+
26
−
15
View file @
708a2d97
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
# 2021-12-02 ah v2.1 added parameter "prune" to cleanup only
# 2021-12-02 ah v2.1 added parameter "prune" to cleanup only
# 2022-02-10 ah v2.2 update logging (removing tee)
# 2022-02-10 ah v2.2 update logging (removing tee)
# 2022-10-01 ah v2.3 customize prune and verify action
# 2022-10-01 ah v2.3 customize prune and verify action
# 2022-10-04 ah v2.4 prune and verify are non directory based
# ================================================================================
# ================================================================================
...
@@ -404,11 +405,29 @@ function setAction(){
...
@@ -404,11 +405,29 @@ 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
color warning
echo
"DIR SKIP
$mydir
... does not exist (no error)"
color reset
fi
echo
done
# --- prune
# --- prune
if
[
$doPrune
-eq
0
]
;
then
if
[
$doPrune
-eq
0
]
;
then
echo
"SKIP prune"
echo
"SKIP prune"
else
else
h3
"
`
date
`
PRUNE
for
${
BACKUP_DIR
}
"
h3
"
`
date
`
PRUNE
repository data
"
t_backupDoPrune
t_backupDoPrune
touch
${
lastprunefile
}
touch
${
lastprunefile
}
echo
echo
...
@@ -419,21 +438,13 @@ function setAction(){
...
@@ -419,21 +438,13 @@ function setAction(){
if
[
$doVerify
-eq
0
]
;
then
if
[
$doVerify
-eq
0
]
;
then
echo
"SKIP verify"
echo
"SKIP verify"
else
else
h3
"
`
date
`
VERIFY
for
${
BACKUP_DIR
}
"
h3
"
`
date
`
VERIFY
repository data
"
t_backupDoVerify
t_backupDoVerify
touch
${
lastverifyfile
}
touch
${
lastverifyfile
}
echo
echo
fi
fi
echo
echo
else
color warning
echo
"DIR SKIP
$mydir
... does not exist (no error)"
color reset
fi
echo
done
echo
$rc
>
${
rcfile
}
echo
$rc
>
${
rcfile
}
exit
$rc
exit
$rc
...
...
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