I wanted to try xCluster Replication with YugabyteDB.
If you try to start a cluster using the --backup_daemon=true option while looking at the documentation, the following message is displayed and the cluster cannot be created.
I expanded yugabyte-2.25.1.0-b381-linux-x86_64.tar.gz and looked at the binary, but there seems to be no directory called ybc/bin in tarball.
Where can I find ybc/bin?
Should I expand and use the binary below the share directory?
$ sudo yugabyted start --advertise_address=172.17.28.47 --base_dir=/home/yugabyte/data --backup_daemon=true
Starting yugabyted...
âś… System checks
âś… YugabyteDB Started
Yugabyte yb-controller-server file not found in paths ['/opt/yugabyte/yugabyte-2.25.1.0/ybc/bin']. Please check the paths.
I get this error, how can I get this command through?
$ sudo yugabyted xcluster create_checkpoint \
--replication_id my_xcluster_repl \
--databases testdb
Error: ysqlsh: error: connection to server at "localhost" (::1), port 5433 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
connection to server at "localhost" (127.0.0.1), port 5433 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
Ok.
To execute this command, it seems that the specified DB is created, that there is one table in that DB, and the specification of --base_dir is required. I want you to write it in the document.
sudo yugabyted xcluster create_checkpoint \
--base_dir=/home/yugabyte/data \
--replication_id my_xcluster_repl \
--databases testdb
+---------------------------------------------------------------------------------------------------------------------------------------------+
| yugabyted |
+---------------------------------------------------------------------------------------------------------------------------------------------+
| Status : xCluster create checkpoint success. |
| Bootstrapping : Before running the xcluster setup command, Database `testdb` and schema needs to be applied on the target cluster. |
+---------------------------------------------------------------------------------------------------------------------------------------------+
Please specify on which part you’re stuck so we can proceed with troubleshooting steps.
--base_dir is always required. It just has a default value. So when you create a cluster with non-default value on --base_dir, you should always set it.
I set it up while looking at the following document. If I don’t understand, I asked Yugabyte Docs AI about options and advised that Yugabyte Docs AI also needs --base_dir.
What does replication_id specify, what is it, what is the retention option for, and what is the unit? I heard from Yugabyte Docs AI and found out that it was day. I found out that I had to specify a value of 1 or more to run it, but I didn’t understand what the retention period was.
If you look at the reference, it is written that if you want to use the --base_dir case or backup or restore this time, you should expand the tarball in the separate share directory and copy the ybc binary.
However, I thought that if it had been deployed to that path from the beginning at the time of packaging, it would be better without having to copy it manually.
However, I also think it was not good that I didn’t look at the document well.
It was difficult, but I am happy that I was able to get the xCluster replication of YugabyteDB to work properly.
That’s correct. The reason is that yb-controller is not currently open source but only free to use under the polyform license. I will ask internally for a way to make this easier to use.