Commit c4a888c7 authored by godog's avatar godog

Use . as separator for filename when streaming to restic

Restic 0.9.3 fails when --stdin-filename contains slashes:

repository 954a4e61 opened successfully, password is correct
error: file does not exist
Fatal: unable to save snapshot: snapshot is empty
parent 68b1a8ae
Pipeline #1978 passed with stages
in 1 minute and 37 seconds
...@@ -191,7 +191,7 @@ func (r *resticRepository) BackupStream(ctx context.Context, backup Backup, ds D ...@@ -191,7 +191,7 @@ func (r *resticRepository) BackupStream(ctx context.Context, backup Backup, ds D
// Try to do the obvious thing with naming. // Try to do the obvious thing with naming.
name := ds.Name name := ds.Name
if len(ds.Atoms) == 1 { if len(ds.Atoms) == 1 {
name = fmt.Sprintf("%s/%s", ds.Name, ds.Atoms[0].Name) name = fmt.Sprintf("%s.%s", ds.Name, ds.Atoms[0].Name)
} }
return r.shell.Run(ctx, fmt.Sprintf( return r.shell.Run(ctx, fmt.Sprintf(
"%s backup --stdin --stdin-filename %s", "%s backup --stdin --stdin-filename %s",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment