Recovery and Replication
Last updated
Last updated
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.
Go to "Manage Allocations" and select "S3 Setup." and click on 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.
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
.
Now add your IP address and click on generate script in Blimp UI. Then enter the password for S3 deployment.
Now copy the script and run it in your server terminal.
Go to "Standard Allocation" in the Blimp UI. Create a new allocation and name it allocation22
.
Click on "Confirm" and select the blobbers, then confirm again. This will create a standard allocation.
In the Blimp UI, copy the newly created 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.
Copy the docker-compose.yml
, config.yaml
, wallet.json
and z3server.json
files from the .zcn
folder to the .zcn2
folder.
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
:
Change the first port in .zcn
from 9002
to 9000
in docker-compose.yml file, making it 9000:9000
.
Now run the following commands to start the Docker containers defined in the docker-compose.yml
:
Follow the installation guide provided in the ZS3Server documentation.
Install mc packages using Homebrew
Binary Download
GNU/Linux
64-bit Intel
GNU/Linux
64-bit PPC
GNU/Linux
64-bit ARM
Linux/s390x
S390X
Binary Download
Microsoft Windows
64-bit Intel
Run the following command to create an alias for zs3server1
:
Run the following command to create an alias for zs3server2
:
Create a bucket in zs3server1
with allocation21
:
Verify the bucket:
Copy data to the created bucket:
Create a bucket in zs3server2
with allocation22
:
Verify the bucket:
Run the following command to create replication between the buckets:
Any deletions in bucket1
will automatically replicate in bucket2
.
Shut down zs3server1
and clean up its deployment.
Create a new allocation (allocation23
) using the Blimp UI with a standard allocation.
Update the allocation.txt
file in .zcn
with the new allocation23
ID.
Set up an alias for the new server:
Create a new bucket:
Restore data to the new allocation:
Check that the files have been recovered to the new allocation:
This section outlines the steps to set up replication between two ZS3Servers.
Replication ensures that data from one server is mirrored to another for backup and redundancy.
Follow the steps below to configure and initiate replication.
For running two ZS3Servers on the same machine:
Copy the contents of the .zcn
folder to .zcn2
.
Update allocation.txt
and zs3server.json
in .zcn2
.
Update the docker-compose.yml
file to use unique ports.
Ensure both ZS3Servers are configured using MinIO Client aliases:
Alias for the first server (zcn
):
Alias for the second server (zcn2
):
Navigate to the .zcn2
folder:
Open the terminal and run:
Verify the ports are correctly set to 9002:9000
.
Check the standard allocation ID:
Compare this ID with the allocation ID in the Blimp dashboard to ensure consistency.
Use the MinIO Client (mc) to configure aliases for both servers:
Format:
Example:
Run the alias commands:
Use the following command to start replication:
Replace <BUCKET_PREFIX>
with the appropriate bucket names.
Example:
test2-s3
is a folder in the S3 allocation.
mbtest2
will be created in the standard allocation on zcn2
.
All data from test2-s3
will be replicated into mbtest2
.
Check the contents of the buckets:
Create new buckets if necessary:
Confirm that the data is mirrored correctly: