aboutsummaryrefslogtreecommitdiff
path: root/weed/replication/replicator.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <lebedev_k@tochka.com>2021-01-28 14:56:13 +0500
committerKonstantin Lebedev <lebedev_k@tochka.com>2021-01-28 14:56:13 +0500
commit02fdc0a333bedac882c5f9c103d073c3180ec6bb (patch)
treeb21a49e6febcae643ed2097a46d34cef86765c21 /weed/replication/replicator.go
parent6b54ff991249d2ce5dfbe28ffb503fc770d5db6c (diff)
downloadseaweedfs-02fdc0a333bedac882c5f9c103d073c3180ec6bb.tar.xz
seaweedfs-02fdc0a333bedac882c5f9c103d073c3180ec6bb.zip
rename backup to local_incremental and use mtime
Diffstat (limited to 'weed/replication/replicator.go')
-rw-r--r--weed/replication/replicator.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/replication/replicator.go b/weed/replication/replicator.go
index 81d546c3c..7688029e6 100644
--- a/weed/replication/replicator.go
+++ b/weed/replication/replicator.go
@@ -42,14 +42,14 @@ func (r *Replicator) Replicate(ctx context.Context, key string, message *filer_p
return nil
}
var dateKey string
- if r.sink.GetName() == "backup" {
- var crTime int64
+ if r.sink.GetName() == "local_incremental" {
+ var mTime int64
if message.NewEntry != nil {
- crTime = message.NewEntry.Attributes.Crtime
+ mTime = message.NewEntry.Attributes.Mtime
} else if message.OldEntry != nil {
- crTime = message.OldEntry.Attributes.Crtime
+ mTime = message.OldEntry.Attributes.Mtime
}
- dateKey = time.Unix(crTime, 0).Format("2006-01-02")
+ dateKey = time.Unix(mTime, 0).Format("2006-01-02")
}
newKey := util.Join(r.sink.GetSinkToDirectory(), dateKey, key[len(r.source.Dir):])
glog.V(3).Infof("replicate %s => %s", key, newKey)