mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-02 08:40:39 +00:00
specific location
This commit is contained in:
@@ -2,6 +2,7 @@ package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/cupcakearmy/autorestic/internal"
|
||||
"github.com/cupcakearmy/autorestic/internal/colors"
|
||||
@@ -22,8 +23,13 @@ var backupCmd = &cobra.Command{
|
||||
CheckErr(err)
|
||||
errors := 0
|
||||
for _, name := range selected {
|
||||
location, _ := internal.GetLocation(name)
|
||||
errs := location.Backup(false)
|
||||
var splitted = strings.Split(name, "@")
|
||||
var specificBackend = ""
|
||||
if len(splitted) > 1 {
|
||||
specificBackend = splitted[1]
|
||||
}
|
||||
location, _ := internal.GetLocation(splitted[0])
|
||||
errs := location.Backup(false, specificBackend)
|
||||
for err := range errs {
|
||||
colors.Error.Println(err)
|
||||
errors++
|
||||
|
Reference in New Issue
Block a user