Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tabacco
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
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
Hide 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