remove path bin
This commit is contained in:
parent
f17039d370
commit
95d4fce73d
10
app.go
10
app.go
@ -463,7 +463,7 @@ func (a AppConfig) TakeSnapshot(schedule string) error {
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.TakeSnapshot : %s : taking snapshot on %s for %s", a.Name, k, v)
|
||||
}
|
||||
err := cfg.Box[k].ssh.exec("/usr/sbin/zfsnap snapshot -p " + schedule + "- -a " + cfg.Zfsnap[schedule] + v)
|
||||
err := cfg.Box[k].ssh.exec("zfsnap snapshot -p " + schedule + "- -a " + cfg.Zfsnap[schedule] + v)
|
||||
if err != nil {
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.TakeSnapshot : %s : Error executing zfsnap on %s", a.Name, k)
|
||||
@ -527,7 +527,7 @@ func (a AppConfig) SendSnapshots() error {
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.SendSnapshots : %s : Initializing snapshot on %s from %s", a.Name, dest.Box(), string(sFirstSnapshot))
|
||||
}
|
||||
err = cfg.Box[dest.Box()].ssh.exec("/usr/bin/ssh " + cfg.Box[src.Box()].User + "@" + src.Box() + " /sbin/zfs send " + string(sFirstSnapshot) + " | /sbin/zfs recv -F " + dest.Path() + "/" + src.Box() + "/" + src.Path())
|
||||
err = cfg.Box[dest.Box()].ssh.exec("ssh " + cfg.Box[src.Box()].User + "@" + src.Box() + " zfs send " + string(sFirstSnapshot) + " | zfs recv -F " + dest.Path() + "/" + src.Box() + "/" + src.Path())
|
||||
if err != nil {
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.SendSnapshots : %s : Initializing snapshot on %s from %s failed (%s)", a.Name, dest.Box(), string(sFirstSnapshot), err)
|
||||
@ -542,7 +542,7 @@ func (a AppConfig) SendSnapshots() error {
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.SendSnapshots : %s : Sending incrementally %s to %s", a.Name, string(sNextSnapshot), dest.Box())
|
||||
}
|
||||
err = cfg.Box[dest.Box()].ssh.exec("/usr/bin/ssh " + cfg.Box[src.Box()].User + "@" + src.Box() + " /sbin/zfs send -I " + string(sCurrSnapshot) + " " + string(sNextSnapshot) + " | /sbin/zfs recv " + dest.Path() + "/" + src.Box() + "/" + src.Path())
|
||||
err = cfg.Box[dest.Box()].ssh.exec("ssh " + cfg.Box[src.Box()].User + "@" + src.Box() + " zfs send -I " + string(sCurrSnapshot) + " " + string(sNextSnapshot) + " | zfs recv " + dest.Path() + "/" + src.Box() + "/" + src.Path())
|
||||
if err != nil {
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.SendSnapshots : %s : Sending snapshot on %s from %s failed (%s)", a.Name, dest.Box(), string(sNextSnapshot), err)
|
||||
@ -566,7 +566,7 @@ func (a AppConfig) SendSnapshots() error {
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.SendSnapshots : %s : Sending incrementally %s to %s", a.Name, string(sNextSnapshot), dest.Box())
|
||||
}
|
||||
err = cfg.Box[dest.Box()].ssh.exec("/usr/bin/ssh " + cfg.Box[src.Box()].User + "@" + src.Box() + " /sbin/zfs send -I " + string(sCurrSnapshot) + " " + string(sNextSnapshot) + " | /sbin/zfs recv " + dest.Path() + "/" + src.Box() + "/" + src.Path())
|
||||
err = cfg.Box[dest.Box()].ssh.exec("ssh " + cfg.Box[src.Box()].User + "@" + src.Box() + " zfs send -I " + string(sCurrSnapshot) + " " + string(sNextSnapshot) + " | zfs recv " + dest.Path() + "/" + src.Box() + "/" + src.Path())
|
||||
if err != nil {
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.SendSnapshots : %s : Sending snapshot on %s from %s failed (%s)", a.Name, dest.Box(), string(sNextSnapshot), err)
|
||||
@ -598,7 +598,7 @@ func (a AppConfig) CleanupSnapshot() error {
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.CleanupSnapshot : %s : cleaning snapshots on %s for%s", a.Name, k, v)
|
||||
}
|
||||
err := cfg.Box[k].ssh.exec("/usr/sbin/zfsnap destroy -p hourly- -p daily- -p weekly- -p monthly- -p yearly-" + v)
|
||||
err := cfg.Box[k].ssh.exec("zfsnap destroy -p hourly- -p daily- -p weekly- -p monthly- -p yearly-" + v)
|
||||
if err != nil {
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.CleanupSnapshot : %s : Error executing zfsnap on %s", a.Name, k)
|
||||
|
@ -114,7 +114,7 @@ func (c *Config) Load() error {
|
||||
var b bytes.Buffer
|
||||
session.Stdout = &b
|
||||
|
||||
err = session.Run("TZ=\"" + cfg.Timezone + "\" /usr/sbin/zfsnap --version")
|
||||
err = session.Run("TZ=\"" + cfg.Timezone + "\" zfsnap --version")
|
||||
if err != nil {
|
||||
if *debugFlag {
|
||||
log.Printf("Config.Load : client.NewSession(%s) : %s", k, err)
|
||||
|
Loading…
Reference in New Issue
Block a user