mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-22 08:16:25 +00:00
also enable azure and google cloud
This commit is contained in:
parent
3dd3956d64
commit
cd7a5cbc13
@ -182,6 +182,8 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) {
|
|||||||
env["RESTIC_REPOSITORY"] = "/repo"
|
env["RESTIC_REPOSITORY"] = "/repo"
|
||||||
case "b2":
|
case "b2":
|
||||||
case "s3":
|
case "s3":
|
||||||
|
case "azure":
|
||||||
|
case "gs":
|
||||||
// No additional setup needed
|
// No additional setup needed
|
||||||
case "rclone":
|
case "rclone":
|
||||||
// Read host rclone config and mount it into the container
|
// Read host rclone config and mount it into the container
|
||||||
@ -192,6 +194,7 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) {
|
|||||||
splitted := strings.Split(strings.TrimSpace(configFile), "\n")
|
splitted := strings.Split(strings.TrimSpace(configFile), "\n")
|
||||||
configFilePath := splitted[len(splitted)-1]
|
configFilePath := splitted[len(splitted)-1]
|
||||||
docker = append(docker, "--volume", configFilePath+":"+"/root/.config/rclone/rclone.conf:ro")
|
docker = append(docker, "--volume", configFilePath+":"+"/root/.config/rclone/rclone.conf:ro")
|
||||||
|
// Install rclone in the container
|
||||||
args = append([]string{"apk", "add", "rclone", "&&"}, args...)
|
args = append([]string{"apk", "add", "rclone", "&&"}, args...)
|
||||||
default:
|
default:
|
||||||
return "", fmt.Errorf("Backend type \"%s\" is not supported as volume endpoint", b.Type)
|
return "", fmt.Errorf("Backend type \"%s\" is not supported as volume endpoint", b.Type)
|
||||||
|
Loading…
Reference in New Issue
Block a user