multiple paths

This commit is contained in:
cupcakearmy 2021-10-30 13:01:31 +02:00
parent 4055ebf8e8
commit c2f9ed9204
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9
2 changed files with 6 additions and 3 deletions

View File

@ -81,7 +81,8 @@ func (c *Config) Describe() {
var tmp string
colors.PrimaryPrint(`Location: "%s"`, name)
colors.PrintDescription("From", l.From)
// TODO: Add more info
// colors.PrintDescription("From", l.From)
tmp = ""
for _, to := range l.To {

View File

@ -20,6 +20,7 @@ const (
TypeLocal LocationType = "local"
TypeVolume LocationType = "volume"
VolumePrefix string = "volume:"
TagPrefix string = "ar:"
)
type HookArray = []string
@ -33,7 +34,7 @@ type Hooks struct {
type Location struct {
name string `yaml:",omitempty"`
From string `yaml:"from,omitempty"`
From []string `yaml:"from,omitempty"`
To []string `yaml:"to,omitempty"`
Hooks Hooks `yaml:"hooks,omitempty"`
Cron string `yaml:"cron,omitempty"`
@ -179,8 +180,9 @@ func (l Location) Backup(cron bool, specificBackend string) []error {
cmd = append(cmd, lFlags...)
cmd = append(cmd, bFlags...)
if cron {
cmd = append(cmd, "--tag", "cron")
cmd = append(cmd, "--tag", TagPrefix+"cron")
}
cmd = append(cmd, "--tag", TagPrefix+"location:"+l.name)
cmd = append(cmd, ".")
backupOptions := ExecuteOptions{
Dir: options.Dir,