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
a565af62
Commit
a565af62
authored
5 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
v1.9 for rsync targets: create remote target dir with ssh command
parent
a6245004
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
logs/.gitkeep
+0
-0
0 additions, 0 deletions
logs/.gitkeep
transfer.sh
+18
-10
18 additions, 10 deletions
transfer.sh
with
18 additions
and
10 deletions
logs/.gitkeep
deleted
100644 → 0
+
0
−
0
View file @
a6245004
This diff is collapsed.
Click to expand it.
transfer.sh
+
18
−
10
View file @
a565af62
...
...
@@ -28,6 +28,7 @@
# 2018-06-19 ah,ds v1.6 replace --exclude with --exclude regexp in custom dirs
# 2019-06-05 ah,ds v1.7 add custom cache dir
# 2019-09-09 ah,ds v1.8 add testfile on target
# 2019-10-30 ah,ds v1.9 for rsync targets: create remote target dir with ssh command
# ================================================================================
...
...
@@ -257,17 +258,24 @@
fi
# ---------- ENDE --------------------
# --- "trick": create remote directory by checking collection status
# with switching to "scp"
# rsync://backupuser@mystorage//backupdir/hostname/jobname
# --- for rsync only: create remote directory
echo
${
sTarget
}
| fgrep
"rsync://"
>
/dev/null
if
[
$?
-eq
0
]
;
then
sshTarget
=
`
echo
${
sTarget
}
|
sed
"s#rsync://#scp://#"
`
echo
Creating remote directory with fetching collection-status on
$sshTarget
# sshTarget=`echo ${sTarget} | sed "s#rsync://#scp://#"`
# echo Creating remote directory with fetching collection-status on $sshTarget
# color cmd
# duplicity collection-status ${sParams} ${sshTarget}
# color reset
sshTarget
=
`
echo
${
sTarget
}
|
cut
-f
3
-d
'/'
`
RemoteDir
=
`
echo
${
sTarget
}
|
cut
-f
4-
-d
'/'
`
cmd
=
"ssh"
if
[
!
-z
${
sFileSshPrivkey
}
]
;
then
cmd
=
"
${
cmd
}
-i
${
sFileSshPrivkey
}
"
fi
cmd
=
"
${
cmd
}
${
sshTarget
}
mkdir -p
${
RemoteDir
}
2>/dev/null ; ls -ld
${
RemoteDir
}
"
echo
Creating remote directory first ...
color cmd
duplicity collection-status
${
sParams
}
${
sshTarget
}
$cmd
color reset
fi
...
...
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