mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-22 08:16:25 +00:00
multiple paths
This commit is contained in:
parent
4055ebf8e8
commit
c2f9ed9204
@ -81,7 +81,8 @@ func (c *Config) Describe() {
|
|||||||
var tmp string
|
var tmp string
|
||||||
colors.PrimaryPrint(`Location: "%s"`, name)
|
colors.PrimaryPrint(`Location: "%s"`, name)
|
||||||
|
|
||||||
colors.PrintDescription("From", l.From)
|
// TODO: Add more info
|
||||||
|
// colors.PrintDescription("From", l.From)
|
||||||
|
|
||||||
tmp = ""
|
tmp = ""
|
||||||
for _, to := range l.To {
|
for _, to := range l.To {
|
||||||
|
@ -20,6 +20,7 @@ const (
|
|||||||
TypeLocal LocationType = "local"
|
TypeLocal LocationType = "local"
|
||||||
TypeVolume LocationType = "volume"
|
TypeVolume LocationType = "volume"
|
||||||
VolumePrefix string = "volume:"
|
VolumePrefix string = "volume:"
|
||||||
|
TagPrefix string = "ar:"
|
||||||
)
|
)
|
||||||
|
|
||||||
type HookArray = []string
|
type HookArray = []string
|
||||||
@ -33,7 +34,7 @@ type Hooks struct {
|
|||||||
|
|
||||||
type Location struct {
|
type Location struct {
|
||||||
name string `yaml:",omitempty"`
|
name string `yaml:",omitempty"`
|
||||||
From string `yaml:"from,omitempty"`
|
From []string `yaml:"from,omitempty"`
|
||||||
To []string `yaml:"to,omitempty"`
|
To []string `yaml:"to,omitempty"`
|
||||||
Hooks Hooks `yaml:"hooks,omitempty"`
|
Hooks Hooks `yaml:"hooks,omitempty"`
|
||||||
Cron string `yaml:"cron,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, lFlags...)
|
||||||
cmd = append(cmd, bFlags...)
|
cmd = append(cmd, bFlags...)
|
||||||
if cron {
|
if cron {
|
||||||
cmd = append(cmd, "--tag", "cron")
|
cmd = append(cmd, "--tag", TagPrefix+"cron")
|
||||||
}
|
}
|
||||||
|
cmd = append(cmd, "--tag", TagPrefix+"location:"+l.name)
|
||||||
cmd = append(cmd, ".")
|
cmd = append(cmd, ".")
|
||||||
backupOptions := ExecuteOptions{
|
backupOptions := ExecuteOptions{
|
||||||
Dir: options.Dir,
|
Dir: options.Dir,
|
||||||
|
Loading…
Reference in New Issue
Block a user