-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4655 from ae-govau/unixsocket
Enhancement: option to send HTTP over unix socket
- Loading branch information
Showing
9 changed files
with
190 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Enhancement: support connection to rest-server using unix socket | ||
|
||
Restic now supports connecting to rest-server using a unix socket for | ||
rest-server version 0.13.0 or later. | ||
|
||
This allows running restic as follows: | ||
|
||
``` | ||
rest-server --listen unix:/tmp/rest.socket --data /path/to/data & | ||
restic -r rest:http+unix:///tmp/rest.socket:/my_backup_repo/ [...] | ||
``` | ||
|
||
https://github.com/restic/restic/issues/4287 | ||
https://github.com/restic/restic/pull/4655 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//go:build !windows && go1.20 | ||
// +build !windows,go1.20 | ||
|
||
package rest_test | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"path" | ||
"testing" | ||
|
||
rtest "github.com/restic/restic/internal/test" | ||
) | ||
|
||
func TestBackendRESTWithUnixSocket(t *testing.T) { | ||
defer func() { | ||
if t.Skipped() { | ||
rtest.SkipDisallowed(t, "restic/backend/rest.TestBackendREST") | ||
} | ||
}() | ||
|
||
ctx, cancel := context.WithCancel(context.Background()) | ||
defer cancel() | ||
|
||
dir := rtest.TempDir(t) | ||
serverURL, cleanup := runRESTServer(ctx, t, path.Join(dir, "data"), fmt.Sprintf("unix:%s", path.Join(dir, "sock"))) | ||
defer cleanup() | ||
|
||
newTestSuite(serverURL, false).RunTests(t) | ||
} |