Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Iml Backup Server
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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 Server
Commits
4d12d315
Commit
4d12d315
authored
4 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
backup-status.sh v1.5 - handle multiple backup tools
parent
3cd74416
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+3
-0
3 additions, 0 deletions
.gitignore
backup-status.sh
+37
-38
37 additions, 38 deletions
backup-status.sh
with
40 additions
and
38 deletions
.gitignore
0 → 100644
+
3
−
0
View file @
4d12d315
# ignore files of a local instance
inc_config.sh
log/c*
This diff is collapsed.
Click to expand it.
backup-status.sh
+
37
−
38
View file @
4d12d315
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
# 2018-02-14 v1.1 hahn configure time limit
# 2018-02-14 v1.1 hahn configure time limit
# 2019-10-20 v1.3 hahn source inc_config.sh
# 2019-10-20 v1.3 hahn source inc_config.sh
# 2020-12-07 v1.4 hahn deactivate backup
# 2020-12-07 v1.4 hahn deactivate backup
# 2021-06-16 v1.5 hahn handle multiple backup tools
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
...
@@ -15,7 +16,7 @@
...
@@ -15,7 +16,7 @@
cd
${
sBackupBasedir
}
||
exit
1
cd
${
sBackupBasedir
}
||
exit
1
sVersion
=
1.
4
sVersion
=
1.
5
typeset
-i
iErrors
=
0
typeset
-i
iErrors
=
0
typeset
-i
iHours
=
36
typeset
-i
iHours
=
36
typeset
-i
iMinutes
=
$iHours
*
60
typeset
-i
iMinutes
=
$iHours
*
60
...
@@ -60,7 +61,7 @@ function _getFileAge(){
...
@@ -60,7 +61,7 @@ function _getFileAge(){
function
getServers
(){
function
getServers
(){
# ls -1 | fgrep "iml.unibe.ch"
# ls -1 | fgrep "iml.unibe.ch"
ls
-1
|
grep
-Ev
"
^
(_active|SOMETHINGELSE)"
ls
-1
d
*
/
*
|
grep
-Ev
"
/
(_active|
#recycle|
SOMETHINGELSE)"
}
}
...
@@ -94,7 +95,7 @@ function _checkDir(){
...
@@ -94,7 +95,7 @@ function _checkDir(){
echo
echo
else
else
echo
"SKIP:
$mydir
won't be scanned."
echo
"SKIP:
$mydir
won't be scanned.
It isn't a directory.
"
fi
fi
}
}
...
@@ -118,14 +119,13 @@ echo
...
@@ -118,14 +119,13 @@ echo
echo
"changed files last
$iHours
hours and used diskspace:"
echo
"changed files last
$iHours
hours and used diskspace:"
echo
echo
# _checkDir .
# _checkDir .
echo
# echo
echo
"... and by server and backup sets:"
# echo "... and by server and backup sets:"
echo
# echo
for
myserver
in
`
getServers
`
for
myserver
in
`
getServers
`
do
do
color
head
color
head
echo
-----
$myserver
echo
-----
SERVER:
$myserver
color reset
color reset
echo
echo
if
[
-f
$myserver
/
$sInactiveFile
]
;
then
if
[
-f
$myserver
/
$sInactiveFile
]
;
then
...
@@ -146,9 +146,8 @@ echo
...
@@ -146,9 +146,8 @@ echo
echo
"INFO: keeping it
$iKeepBackups
d ..
$iDays
d left."
echo
"INFO: keeping it
$iKeepBackups
d ..
$iDays
d left."
fi
fi
else
else
echo
_checkDir
$myserver
_checkDir
$myserver
for
subdir
in
`
ls -1
$myserver
`
echo
$myserver
|
grep
"restic-backup"
>
/dev/null
||
for
subdir
in
`
ls -1
$myserver
`
do
do
_checkDir
$myserver
/
$subdir
_checkDir
$myserver
/
$subdir
done
done
...
@@ -164,7 +163,7 @@ if [ $iErrors -eq 0 ]; then
...
@@ -164,7 +163,7 @@ if [ $iErrors -eq 0 ]; then
echo
"OK"
echo
"OK"
else
else
color error
color error
echo
"
$iE
rrors
Errors
detected.
"
echo
"
Found e
rrors
:
$i
Errors
"
fi
fi
color reset
color reset
...
...
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