I decided to try YugabyteDB’s semi-automatic transactional xCluster replication by following this procedure.
The version is yugabyte-2.25.2.0-b359-linux, and this time it is not a container, but trying to run Linux natively with AlmaLinux 8.10.
Looking at this document, I added ybc’s PATH.
-
NFS Server
sudo dnf install -y rpcbind nfs-utils
sudo mkdir -p /share/nfs
sudo vi /etc/exports
/share/nfs 172.17.28.0/24(rw,no_root_squash,async)
sudo systemctl enable rpcbind nfs-server
sudo systemctl restart rpcbind nfs-server
sudo chmod 777 /share/nfs
sudo firewall-cmd --permanent --zone=public --add-service=nfs
sudo firewall-cmd --permanent --zone=public --add-service=rpc-bind
sudo firewall-cmd --reload
- ALL nodes (NFS Client)
sudo dnf install -y nfs-utils
sudo firewall-cmd --permanent --zone=public --add-service=nfs
sudo firewall-cmd --reload
sudo mkdir -p /share/nfsc
sudo chmod 777 /share/nfsc
sudo mount -v -t nfs 172.17.28.26:/share/nfs /share/nfsc
- Create YugabyteDB Cluster
//Source Nodes
sudo yugabyted start --base_dir=/home/yugabyte/data --advertise_address=172.17.28.20 --backup_daemon=true
sudo yugabyted start --base_dir=/home/yugabyte/data --advertise_address=172.17.28.21 --join=yuganode1 --backup_daemon=true
sudo yugabyted start --base_dir=/home/yugabyte/data --advertise_address=172.17.28.22 --join=yuganode1 --backup_daemon=true
//Target Nodes
sudo yugabyted start --base_dir=/home/yugabyte/data --advertise_address=172.17.28.23 --backup_daemon=true
sudo yugabyted start --base_dir=/home/yugabyte/data --advertise_address=172.17.28.24 --join=yuganode4 --backup_daemon=true
sudo yugabyted start --base_dir=/home/yugabyte/data --advertise_address=172.17.28.25 --join=yuganode4 --backup_daemon=true
If you perform a backup, it will fail.
sudo yugabyted backup --database=sysbench --cloud_storage_uri=/share/nfsc --base_dir=/home/yugabyte/data
+--------------------------------------------------+
| yugabyted |
+--------------------------------------------------+
| Status : Backup failed. Check the logs. |
+--------------------------------------------------+
When I executed the command, there was the following output.
[yugabyted backup] 2025-06-09 14:33:41,809 INFO: | 0.0s | Running yugabyted command: '/opt/yugabyte/latest/bin/yugabyted bac
kup --database=sysbench --cloud_storage_uri=/share/nfsc --base_dir=/home/yugabyte/data'
[yugabyted backup] 2025-06-09 14:33:41,809 INFO: | 0.0s | cmd = backup using config file: /home/yugabyte/data/conf/yugabyted.conf
[yugabyted backup] 2025-06-09 14:33:41,810 INFO: | 0.0s | Found directory /opt/yugabyte/yugabyte-2.25.2.0/bin for file openssl_proxy.sh
[yugabyted backup] 2025-06-09 14:33:41,810 INFO: | 0.0s | Found directory /opt/yugabyte/yugabyte-2.25.2.0/bin for file yb-admin
[yugabyted backup] 2025-06-09 14:33:41,810 INFO: | 0.0s | Found directory /opt/yugabyte/yugabyte-2.25.2.0/bin for file yb-ts-cli
[yugabyted backup] 2025-06-09 14:33:41,810 INFO: | 0.0s | Found directory /opt/yugabyte/yugabyte-2.25.2.0/postgres/bin for file pg_upgrade
[yugabyted backup] 2025-06-09 14:33:41,818 INFO: | 0.0s | Found directory /opt/yugabyte/yugabyte-2.25.2.0/ybc/bin for file yb-controller-cli
[yugabyted backup] 2025-06-09 14:33:41,818 INFO: | 0.0s | run_process: cmd: ['/opt/yugabyte/yugabyte-2.25.2.0/ybc/bin/yb-controller-cli', 'download_md', '--cloud_dir=nfsc', '--bucket=share', '--cloud_type=nfs', '--local_dir=/tmp/nfsc']
[yugabyted backup] 2025-06-09 14:33:41,901 INFO: | 0.1s | run_process returned 0:
OUT >>
download: Time Taken (ms): 0
download: Start Delay (ms): 0
Bytes Transferred: 0
Object Size: 0
Num Objects: 0
Status: INVALID
<< ERR >>
I0609 14:33:41.894712 163214 controller_object_flags.cc:130] Set --per_upload_num_objects = 2
I0609 14:33:41.894762 163214 controller_object_flags.cc:130] Set --per_download_num_objects = 2
I0609 14:33:41.894771 163214 async_op_resources.h:53] MaxConcurrentUploads = 2
I0609 14:33:41.894775 163214 async_op_resources.h:55] MaxConcurrentDownloads = 2
I0609 14:33:41.894779 163214 async_op_resources.h:57] PerUploadNumObjects = 2
I0609 14:33:41.894784 163214 async_op_resources.h:59] PerDownloadNumObjects = 2
I0609 14:33:41.894819 163214 op.cc:198] Starting Execution
E0609 14:33:41.895043 163220 dir_ops_executor.cc:182] Got error downloading dir manifest from nfsc/backup.md
E0609 14:33:41.895067 163220 dir_ops_executor.cc:485] Unable to get Manifest for nfsc/backup.md
I0609 14:33:41.895110 163214 op.cc:222] Done
<<
[yugabyted backup] 2025-06-09 14:33:41,902 INFO: | 0.1s | run_process: cmd: ['/opt/yugabyte/yugabyte-2.25.2.0/ybc/bin/yb-controller-cli', 'backup', '--cloud_type=nfs', '--bucket=share', '--cloud_dir=nfsc', '--tserver_ip=172.17.28.20', '--ns=sysbench', '--ns_type=ysql']
[yugabyted backup] 2025-06-09 14:33:41,958 INFO: | 0.2s | run_process returned 0:
OUT >>
Bucket does not exist
Error creating creds for region: '' : COMMAND_FAILED
Usage: yb-controller-cli backup
[--backup_config_data]: Arbitrary string that is uploaded to the backup and returned after restore.
--bucket: Default bucket to use.
[--cloud_dir]: Location relative to bucket where the backup should be stored.
--cloud_type: Which cloud to put the backup on s3/google/azure/nfs.
[--compression]: If specified, backups are compressed. (Default: false)
--ns: Namespace.
--ns_type: Namespace type ysql/ycql.
[--passphrase]: Passphrase to encrypt the backup with.
[--prev_cloud_dir]: Location of previous backup relative to bucket. Specify if differential backup is required
[--tables]: Comma seperated list of tables to backup/restore.
[--task_id]: Id of task. (Default: Random UUID)
--tserver_ip: IP of YB master server on which the backup should be run.
[--use_tablespaces]: Store YSQL TABLESPACE objects into the backup, restore if set to true. (Default: false)
[--wait]: Wait till task is complete when monitoring task progress. (Default: false)
[--certs_dir_name]: Certificates directory
[--server_port]: Port the controller server is listening on (Default: 18018)
<< ERR >>
<<