Zata
LoginSignup
  • Getting Started with Zata.ai
    • Create & activate Account
  • Dashboard
  • Manage
    • Bucket
      • Create Bucket
        • To store objects in a Bucket
      • Deleting the Bucket
      • Bucket Policy
      • Applying Limitations with Bucket Policies
      • Share an object with a presigned URL
    • Access Keys
      • Creating a New Access Key
    • Service URLs for Zata.ai S3
    • Migration
      • Migrate from AWS S3 storage to Zata.ai S3 storage
      • Migrate from Wasabi S3 storage to Zata.ai S3 storage
  • Users
    • Create a Subuser
    • Create a new access key and secret key for the specific subuser.
    • Roles
  • Account
    • Billing
    • Ingress and Egress Policy
  • KnowledgeBase
    • Integration
      • Connect Acronis Backup Gateway With ZATA.AI
      • Connect Bucket with CloudBerry
      • Connect MSP360 Backup With ZATA.AI
      • Connect Veeam Backup Gateway With ZATA.AI
      • Connect Ahsay cloud backup suite(ACBS) with Zata.ai
      • Connect Commvault Backup with ZATA.AI
      • Connect Vembu Backup with ZATA.AI
    • Mount S3 bucket to Linux operating system
    • Connect Bucket with S3 Client
    • Connect Bucket with Cyberduck
    • How to Transfer Data to Zata.ai Bucket Using Rclone
      • For Linux Server
      • For Windows Server
    • Connect S3 storage to CPanel
    • Backup your WordPress Site to Zata.ai S3 storage with using Updraft plugin.
    • Connect S3 Drive to Zata.ai
    • Mount Bucket to Local system using the TntDrive
    • How to Integrate QNAP NAS storage and Backup to Zata.ai
  • FAQ
    • What are the regions of Zata.ai?
    • What is the billing process for Zata.ai ?
    • What happens if I miss a Payment ?
    • How can I get support for billing-related issue?
    • What are the terms and conditions for using Zata.ai services?
    • Where can I find additional information on pricing and billing?
  • Support
Powered by GitBook
On this page
  1. KnowledgeBase

Mount S3 bucket to Linux operating system

PreviousConnect Vembu Backup with ZATA.AINextConnect Bucket with S3 Client

Last updated 20 days ago

To mount an S3 bucket to a Linux machine, you can use a tool like s3fs

Step 1: Install dependencies

sudo apt-get update -y
sudo apt-get install s3fs -y

Step 2: Store your credentials

Create a credentials file to store your access and secret keys securely

echo ACCESS_KEY_ID:SECRET_ACCESS_KEY > ~/.passwd-s3fs
chmod 600 ~/.passwd-s3fs

Replace ACCESS_KEY_ID and SECRET_ACCESS_KEY with your actual credentials.

Step 3: Create a mount point

Create a directory where the S3 bucket will be mounted:

sudo mkdir /mnt/s3bucket

Step 4: Mount S3-Compatible Storage with Path-Style Addressing

s3fs BUCKET_NAME /mnt/s3bucket -o passwd_file=~/.passwd-s3fs,url=https://YOUR_S3_ENDPOINT,allow_other,use_cache=/tmp,sigv4,use_path_request_style

Breakdown of the Options:

  • BUCKET_NAME: Replace this with your actual bucket name.

  • /mnt/s3bucket: The mount point where the bucket will be mounted.

  • -o passwd_file=~/.passwd-s3fs: Specifies the path to the file where your credentials are stored (replace with your own credentials file path if necessary).

  • allow_other: Allows other users to access the mounted directory.

  • use_cache=/tmp: Caches files locally /tmp to improve performance.

  • sigv4: Forces Signature Version 4 signing (needed for most S3-compatible services).

  • use_path_request_style: Forces path-style addressing, which is required for some S3-compatible service

Step 5: Verify the mount

sudo df -h

Now check to mount to navigate to the directory and create a new file on your system.

Now back to the Zata.ai dashboard click on the bucket section, select the bucket, and check the content

Lets see file has been created.

To mount an S3-compatible bucket with path-style addressing permanently (so that it is automatically mounted at boot), you can add an entry to your /etc/fstab file. Here’s how to configure that:

Open /etc/fstab in an editor

sudo vi /etc/fstab

Add an entry to mount your S3 bucket. The format should look like this:

s3fs#Bucket_Name /mnt/s3bucket fuse _netdev,nonempty,allow_other,url=https://idr01.zata.ai,use_path_request_style,passwd_file=/root/.passwd-s3fs 0 0

Replace BUCKET_NAME with your S3 bucket name.

Now, check if the mount entry in /etc/fstab works properly by running the following command

sudo mount -a

Now, reload the daemon service

sudo systemctl daemon-reload

Now, reboot the system and check the mount directory.

df -h

Verify the Mount:- To confirm that the bucket is mounted, list the contents of your mount point.

sudo ls /mnt/s3bucket

url= with your S3-compatible service's endpoint.

https://idr01.zata.ai