Giter Club home page Giter Club logo

nbdkit-s3-gateway's Introduction

nbdkit-S3-gateway

This project aims to use nbdkit's ability to present a block device backed by objects in an S3 bucket as a service an NBD Client can connect to.

The NBD Client will then present a block device that will have a ZFS zpool created on it, which will in turn be used as a target for backups of live ZFS datasets (zfs send zfs recv).

The goal is thin incremental ZFS dataset backups to cheap offsite cloud storage.

Experiment 1 - nbdkit and the included S3 plugin

This worked but seemed very slow.

Experiment 2 - nbdkit and s3backer plugin

Docker Image

Environment Variables

  • DEVICE_SIZE: Total size of the virtual block device
  • DEBUG_HTTP: Ask s3backer to write all it's HTTP request and response headers to the log.
  • S3_ACCESSKEY: S3 Access Key
  • S3_BUCKET: S3 bucket name
  • S3_ENDPOINT_URL: S3 endpoint URL (including https://)
  • S3_PREFIX: The block device is made up objects in the S3 storage. All objects will be prefixed with this value, allowing the same bucket to be used by multiple virtual block devices. This value is also used as the "export name" of the NBD device.
  • S3_OBJECT_SIZE: The size of the indervidual objects in the S3 storage.
  • S3_SECRETKEY: The secret key for accessing the bucket
  • TCP_PORT: The TCP port that the NBD server will listen on

Suitable Wasabi Policy

This might be overkill but it works. Trimming it down will be a future experiment.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AddCannedAcl",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::100000190796:user/ph3.local"
      },
      "Action": [
        "s3:GetObject",
        "s3:GetObjectAcl",
        "s3:ListBucket",
        "s3:PutObject",
        "s3:PutObjectAcl",
        "s3:DeleteObject"
      ],
      "Resource": "arn:aws:s3:::syncoid-ph3-local/*"
    },
    {
      "Sid": "AddCannedAcl",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::100000190796:user/ph3.local"
      },
      "Action": [
        "s3:GetObject",
        "s3:GetObjectAcl",
        "s3:ListBucket",
        "s3:PutObject",
        "s3:PutObjectAcl",
        "s3:DeleteObject"
      ],
      "Resource": "arn:aws:s3:::syncoid-ph3-local"
    }
  ]
}

nbdkit-s3-gateway's People

Contributors

shaunmaher avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.