This section provides a comprehensive guide for setting up recovery between two ZS3Servers.
This setup uses the Blimp UI for deployment, Visual Studio Code for configuration, and MinIO Client (mc) for management.
Whether you're new to ZS3Server or an experienced user, this guide offers detailed instructions for every stage of the process.
Step 1: Deploy ZS3Server1
Go to "Manage Allocations" and select "S3 Setup." and click on create new allocation
Fig1: Manage Allocations
Fig2: Create new allocation
Now add blobbers and Click on "Confirm" to add blobbers. Review and confirm the details and pay from the existing balance. Create an allocation and the S3 server setup will open automatically. You will have to create your server instance by adding IP address.
Fig3: Server setup
You need to obtain the IP address of your server, which can be provided by your hosting provider or retrieved using the ifconfig command in the terminal. For example, in the server logs, you may see an IP address such as 65.109.152.43.
Fig4: IP Address
Now add your IP address and click on generate script in Blimp UI. Then enter the password for S3 deployment.
Fig5: S3 Server Setup
Fig6: S3 deployment password
Now copy the script and run it in your server terminal.
Fig7: Copy Script
Fig8: Run Script
Step 2: Deploy ZS3Server2
Go to "Standard Allocation" in the Blimp UI. Create a new allocation and name it allocation22.
Fig9: Create new standard allocation
Click on "Confirm" and select the blobbers, then confirm again. This will create a standard allocation.
Fig9: Confirm Details
In the Blimp UI, copy the newly created standard allocation ID.
Fig10: Copy Standard Allocation ID
Go to your server, create a new .zcn2 folder in your home directory ($HOME), and navigate to the blimp folder. Inside the blimp folder, create the allocation.txt file and paste the allocation ID.
Fig11: Paste allocation ID
Copy the docker-compose.yml, config.yaml, wallet.json and z3server.json files from the .zcn folder to the .zcn2 folder.
Fig12: Copy wallet.json
Fig 13: Copy z3server.json
Edit the ports in docker-compose.yml.Go to line 55 in the .zcn2/docker-compose.yml file and note the ports 9002:9000. Copy these ports to the .zcn/docker-compose.yml file.
Now run the following commands to start the Docker containers for .zcn2 folder defined in the docker-compose.yml:
Fig14: Copy Ports
Change the first port in .zcn from 9002 to 9000 in docker-compose.yml file, making it 9000:9000.
Fig15: Paste ports
Now run the following commands to start the Docker containers defined in the docker-compose.yml:
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
./mc --help
mc.exe --help
mc alias set zs3server1 http://65.109.152.43:9000 shahnawaz rootroot --api S3v2
mc alias set zs3server2 http://65.109.152.43:9002 shahnawaz rootroot --api S3v2
mc mb zs3server1/allocation21
mc ls zs3server1
mc cp ./ zs3server1/allocation21
mc mb zs3server2/allocation22
mc ls zs3server2
mc mirror zs3server1/allocation21/ zs3server2/allocation22/ --remove watch
mc alias set zs3server3 http://65.109.152.43:9000 shahnawaz rootroot --api S3v2
mc mb zs3server3/allocation23
mc mirror zs3server2/allocation22/ zs3server3/allocation23/
mc ls zs3server3/allocation3
mc alias set primary http://<HOST_IP>:9000 root root --api S3v2
mc alias set secondary http://<HOST_IP>:9002 root root --api S3v2
cd .zcn2/
ls
cat docker-compose.yml
cat blimp/allocation.txt
mc alias set primary http://<HOST_IP>:9000 miniouser miniopassword --api S3v2
mc alias set secondary http://<HOST_IP>:9002 miniouser miniopassword --api S3v2
mc alias set primary http://65.109.152.43:9000 root root --api S3v2
mc alias set secondary http://65.109.152.43:9002 root root --api S3v2
mc alias set .zcn http://<HOST_IP>:9000 root root --api S3v2
mc alias set .zcn2 http://<HOST_IP>:9002 root root --api S3v2