From a58f41139ee7b028ee67113637f116e328f54d12 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 22 Sep 2018 02:08:00 -0700 Subject: [PATCH] Created Async Replication to another Filer (markdown) --- Async-Replication-to-another-Filer.md | 54 +++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Async-Replication-to-another-Filer.md diff --git a/Async-Replication-to-another-Filer.md b/Async-Replication-to-another-Filer.md new file mode 100644 index 0000000..a0f6a59 --- /dev/null +++ b/Async-Replication-to-another-Filer.md @@ -0,0 +1,54 @@ +# Architecture + +![](FilerAsyncReplication.png) + +# How it works + +There should be two Seaweed File Systems running, possibly across data centers. Each should have its filer, master, and volume servers. + +## Configuration +* Configure notification. use "`weed scaffold -config=filer`" to see the notification section. + +``` +[notification.log] +enabled = true + +[notification.kafka] +enabled = false +hosts = [ + "localhost:9092" +] +topic = "seaweedfs_filer1_to_filer2" + +``` + +* Setup Kafka. Possibly you need to create the Kafka topic if auto topic creation is not enabled. + +* Configure replication. use "`weed scaffold -config=replication`" to see the notification section. + +``` +[source.filer] +enabled = true +grpcAddress = "localhost:18888" +directory = "/buckets" # all files under this directory tree are replicated + +[notification.kafka] +enabled = true +hosts = [ + "localhost:9092" +] +topic = "seaweedfs_filer1_to_filer2" + +[sink.filer] +enabled = true +grpcAddress = "localhost:18888" +directory = "/backup" # all replicated files are under this directory tree +replication = "" +collection = "" +ttlSec = 0 + +``` + +Please read the source.filer and sink.filer configurations carefully and make sure you fully understand its intention. This is actually using one filer and replicate files from one folder to another folder. + +* Start the replication. "`weed filer.replicate`" \ No newline at end of file