Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai3
tools
tabacco
Commits
d52335b2
Commit
d52335b2
authored
Oct 20, 2019
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use atom-specific names for restic stdin snapshots
parent
3654e8d1
Pipeline
#4680
failed with stages
in 4 minutes and 34 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
repository_restic.go
repository_restic.go
+12
-2
No files found.
repository_restic.go
View file @
d52335b2
...
...
@@ -221,8 +221,18 @@ func (r *resticRepository) RestoreCmd(ctx context.Context, rctx RuntimeContext,
// A special path for stdin datasets that is likely to be unused by the
// rest of the filesystem (the path namespace in Restic is global).
func
datasetStdinPath
(
ds
*
Dataset
)
string
{
dsPath
:=
filepath
.
Join
(
ds
.
Source
,
ds
.
ID
)
return
fmt
.
Sprintf
(
"/STDIN_%s"
,
strings
.
Replace
(
dsPath
,
"/"
,
"_"
,
-
1
))
var
dsPath
string
switch
len
(
ds
.
Atoms
)
{
case
0
:
dsPath
=
ds
.
Source
case
1
:
dsPath
=
filepath
.
Join
(
ds
.
Source
,
ds
.
Atoms
[
0
]
.
Name
)
default
:
dsPath
=
filepath
.
Join
(
ds
.
Source
,
"all"
)
}
dsPath
=
strings
.
TrimPrefix
(
dsPath
,
"/"
)
dsPath
=
strings
.
Replace
(
dsPath
,
"/"
,
"_"
,
-
1
)
return
fmt
.
Sprintf
(
"/STDIN_%s"
,
dsPath
)
}
func
(
r
*
resticRepository
)
BackupStreamCmd
(
backup
*
Backup
,
ds
*
Dataset
)
string
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment