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
Custom issue tracker
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
Liberate
backupninja
Commits
3094b04d
Commit
3094b04d
authored
10 years ago
by
rhatto
Browse files
Options
Downloads
Patches
Plain Diff
Rsync: check test mode should set proper dest path (#8196)
parent
89860aa3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
handlers/rsync.in
+23
-21
23 additions, 21 deletions
handlers/rsync.in
with
23 additions
and
21 deletions
handlers/rsync.in
+
23
−
21
View file @
3094b04d
...
...
@@ -747,25 +747,24 @@ function move_files {
function
prepare_storage
{
if
[
"
$test
"
]
;
then
return
fi
section
=
"
`
basename
$SECTION
`
"
if
[
"
$format
"
==
"short"
]
;
then
suffix
=
"
$section
.0"
info
"Rotating
$backupdir
/
$SECTION
..."
echo
"Rotating
$backupdir
/
$SECTION
..."
>>
$log
if
[
"
$dest
"
==
"remote"
]
;
then
rotate_short_remote
$backupdir
/
$SECTION
/
$section
$keep
else
rotate_short
$backupdir
/
$SECTION
/
$section
$keep
if
[
!
-d
"
$backupdir
/
$SECTION
/
$section
.0"
]
;
then
mkdir
-p
$backupdir
/
$SECTION
/
$section
.0
fi
if
[
!
"
$test
"
]
;
then
info
"Rotating
$backupdir
/
$SECTION
..."
echo
"Rotating
$backupdir
/
$SECTION
..."
>>
$log
if
[
"
$dest
"
==
"remote"
]
;
then
rotate_short_remote
$backupdir
/
$SECTION
/
$section
$keep
else
rotate_short
$backupdir
/
$SECTION
/
$section
$keep
if
[
!
-d
"
$backupdir
/
$SECTION
/
$section
.0"
]
;
then
mkdir
-p
$backupdir
/
$SECTION
/
$section
.0
fi
fi
fi
elif
[
"
$format
"
==
"long"
]
;
then
...
...
@@ -781,15 +780,18 @@ function prepare_storage {
fi
suffix
=
"
$btype
.1"
info
"Rotating
$backupdir
/
$SECTION
/..."
echo
"Rotating
$backupdir
/
$SECTION
/..."
>>
$log
if
[
"
$dest
"
==
"remote"
]
;
then
rotate_long_remote
$backupdir
/
$SECTION
setup_long_dirs_remote
$backupdir
/
$SECTION
$btype
else
rotate_long
$backupdir
/
$SECTION
setup_long_dirs
$backupdir
/
$SECTION
$btype
if
[
!
"
$test
"
]
;
then
info
"Rotating
$backupdir
/
$SECTION
/..."
echo
"Rotating
$backupdir
/
$SECTION
/..."
>>
$log
if
[
"
$dest
"
==
"remote"
]
;
then
rotate_long_remote
$backupdir
/
$SECTION
setup_long_dirs_remote
$backupdir
/
$SECTION
$btype
else
rotate_long
$backupdir
/
$SECTION
setup_long_dirs
$backupdir
/
$SECTION
$btype
fi
fi
elif
[
"
$format
"
==
"mirror"
]
;
then
...
...
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