Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
backupninja
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
lyz
backupninja
Commits
1fda206f
Commit
1fda206f
authored
13 years ago
by
rhatto
Browse files
Options
Downloads
Patches
Plain Diff
Rsync handler: using more debug/warning instead of regular echo (upstream #3840)
parent
1f367b40
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
handlers/rsync.in
+8
-8
8 additions, 8 deletions
handlers/rsync.in
with
8 additions
and
8 deletions
handlers/rsync.in
+
8
−
8
View file @
1fda206f
...
...
@@ -405,7 +405,7 @@ function rotate_long {
echo
"Debug:
$dir
.1 does not exist, skipping."
continue
1
elif
[
!
-f
$metadata
.1/created
]
&&
[
!
-f
$metadata
.1/rotated
]
;
then
echo
"Warning: metadata does not exist for
$dir
.1. This backup may be only partially completed. Skipping rotation."
warning
"Warning: metadata does not exist for
$dir
.1. This backup may be only partially completed. Skipping rotation."
continue
1
fi
...
...
@@ -425,7 +425,7 @@ function rotate_long {
if
[
!
$created
-gt
$cutoff_time
]
;
then
next
=
$((
i
+
1
))
if
[
!
-d
$dir
.
$next
]
;
then
echo
"D
ebug
:
$rottype
.
$i
-->
$rottype
.
$next
"
d
ebug
"
$rottype
.
$i
-->
$rottype
.
$next
"
$nice
mv
$dir
.
$i
$dir
.
$next
mkdir
-p
$metadata
.
$next
date
+%c%n%s
>
$metadata
.
$next
/rotated
...
...
@@ -433,10 +433,10 @@ function rotate_long {
$nice
mv
$metadata
.
$i
/created
$metadata
.
$next
fi
else
echo
"D
ebug
:
skipping rotation of
$dir
.
$i
because
$dir
.
$next
already exists."
d
ebug
"
skipping rotation of
$dir
.
$i
because
$dir
.
$next
already exists."
fi
else
echo
"D
ebug
:
skipping rotation of
$dir
.
$i
because it was created"
$((
(
now-created
)/
86400
))
"days ago ("
$((
(
now-cutoff_time
)/
86400
))
" needed)."
d
ebug
"
skipping rotation of
$dir
.
$i
because it was created"
$((
(
now-created
)/
86400
))
"days ago ("
$((
(
now-cutoff_time
)/
86400
))
" needed)."
fi
fi
done
...
...
@@ -444,7 +444,7 @@ function rotate_long {
max
=
$((
keepdaily+1
))
if
[
$keepweekly
-gt
0
-a
-d
$backuproot
/daily.
$max
-a
!
-d
$backuproot
/weekly.1
]
;
then
echo
"D
ebug
:
daily.
$max
--> weekly.1"
d
ebug
"
daily.
$max
--> weekly.1"
$nice
mv
$backuproot
/daily.
$max
$backuproot
/weekly.1
mkdir
-p
$backuproot
/metadata/weekly.1
date
+%c%n%s
>
$backuproot
/metadata/weekly.1/rotated
...
...
@@ -455,7 +455,7 @@ function rotate_long {
max
=
$((
keepweekly+1
))
if
[
$keepmonthly
-gt
0
-a
-d
$backuproot
/weekly.
$max
-a
!
-d
$backuproot
/monthly.1
]
;
then
echo
"D
ebug
:
weekly.
$max
--> monthly.1"
d
ebug
"
weekly.
$max
--> monthly.1"
$nice
mv
$backuproot
/weekly.
$max
$backuproot
/monthly.1
mkdir
-p
$backuproot
/metadata/monthly.1
date
+%c%n%s
>
$backuproot
/metadata/monthly.1/rotated
...
...
@@ -473,10 +473,10 @@ function rotate_long {
for
((
i
=
$oldest
;
i
>=
$max
;
i--
))
;
do
if
[
-d
$dir
.
$i
]
;
then
if
[
-d
$backuproot
/rotate.tmp
]
;
then
echo
"D
ebug
:
removing rotate.tmp"
d
ebug
"
removing rotate.tmp"
$nice
rm
-rf
$backuproot
/rotate.tmp
fi
echo
"D
ebug
:
moving
$rottype
.
$i
to rotate.tmp"
d
ebug
"
moving
$rottype
.
$i
to rotate.tmp"
$nice
mv
$dir
.
$i
$backuproot
/rotate.tmp
fi
done
...
...
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