go straight to last snapshot
This commit is contained in:
10
app.go
10
app.go
@@ -594,9 +594,9 @@ func (a AppConfig) SendSnapshots() (err error) {
|
||||
)
|
||||
sNextSnapshot = sFirstSnapshot
|
||||
isLastSnapshot, _ = cfg.Box[src.Box()].ZFSIsLastSnapshot(sNextSnapshot)
|
||||
for !isLastSnapshot {
|
||||
if !isLastSnapshot {
|
||||
sCurrSnapshot = sNextSnapshot
|
||||
sNextSnapshot, err = cfg.Box[src.Box()].ZFSGetNextSnapshot(sNextSnapshot)
|
||||
sNextSnapshot, err = cfg.Box[src.Box()].ZFSGetLastSnapshot(sNextSnapshot.Path())
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.SendSnapshots : %s : Sending incrementally %s to %s", a.Name, string(sNextSnapshot), dest.Box())
|
||||
}
|
||||
@@ -610,7 +610,6 @@ func (a AppConfig) SendSnapshots() (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
isLastSnapshot, _ = cfg.Box[src.Box()].ZFSIsLastSnapshot(sNextSnapshot)
|
||||
}
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.SendSnapshots : %s : All snapshots sent for %s", a.Name, string(src))
|
||||
@@ -626,9 +625,9 @@ func (a AppConfig) SendSnapshots() (err error) {
|
||||
)
|
||||
sNextSnapshot = Snapshot(string(dLastSnapshot)[len(dest.Path())+len(src.Box())+2:])
|
||||
isLastSnapshot, _ = cfg.Box[src.Box()].ZFSIsLastSnapshot(sNextSnapshot)
|
||||
for !isLastSnapshot {
|
||||
if !isLastSnapshot {
|
||||
sCurrSnapshot = sNextSnapshot
|
||||
sNextSnapshot, err = cfg.Box[src.Box()].ZFSGetNextSnapshot(sNextSnapshot)
|
||||
sNextSnapshot, err = cfg.Box[src.Box()].ZFSGetLastSnapshot(sNextSnapshot.Path())
|
||||
if *debugFlag {
|
||||
log.Printf("AppConfig.SendSnapshots : %s : Sending incrementally %s to %s", a.Name, string(sNextSnapshot), dest.Box())
|
||||
}
|
||||
@@ -642,7 +641,6 @@ func (a AppConfig) SendSnapshots() (err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
isLastSnapshot, _ = cfg.Box[src.Box()].ZFSIsLastSnapshot(sNextSnapshot)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user