Git Product home page Git Product logo

s3sync-service's Introduction

s3sync-service

Build golangci-lint CodeQL Go Report Card codecov

Docker Image Size (latest by date) Docker pulls Binary downloads

Helm lint Helm Release

The s3sync-service is a lightweight tool designed with k8s in mind and aimed to syncing data to S3 storage service for multiple sites (path + bucket combination). Each site can have its own set of credentials and be in different region, which makes the s3sync-service really flexible.

Check out the quickstart note or head over to the documentation where you will find more examples on running the application locally or on k8s.

Quickstart

  1. Create directory with configuration file, eg. - /path/to/config/config.yml.
  2. Run docker container with providing AWS credentials via environment variables (IAM role should also do the trick), alternatively credentials could be provided in the config file, mount directory containing the config file and all of the backup directories listed in the config file:
docker run --rm -ti \
  -e "AWS_ACCESS_KEY_ID=AKIAI44QH8DHBEXAMPLE" \
  -e "AWS_SECRET_ACCESS_KEY=je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY" \
  -e "AWS_DEFAULT_REGION=us-east-1" \
  -v "/path/to/config:/opt/s3sync-service" \
  -v "/backup/path:/backup" \
  ghcr.io/mazay/s3sync-service:master \
  ./s3sync-service -config /opt/s3sync-service/config.yml

Docker Compose can also be used:

version: '3.3'
services:
  s3sync-service:
    environment:
      - AWS_ACCESS_KEY_ID=AKIAI44QH8DHBEXAMPLE
      - AWS_SECRET_ACCESS_KEY=je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY
      - AWS_DEFAULT_REGION=us-east-1
    volumes:
      - '/backup/path:/backup'
      - '/path/to/config.yml:/app/config.yml'
    image: ghcr.io/mazay/s3sync-service:master

Configuration

Example configuration, check this for more details:

upload_workers: 10
sites:
- local_path: /local/path1
  bucket: backup-bucket-path1
  bucket_region: us-east-1
  storage_class: STANDARD_IA
  access_key: AKIAI44QH8DHBEXAMPLE
  secret_access_key: je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY
  exclusions:
    - .[Dd][Ss]_[Ss]tore
    - .[Aa]pple[Dd]ouble
- local_path: /local/path2
  bucket: backup-bucket-path2
  bucket_path: path2
  exclusions:
    - "[Tt]humbs.db"
- local_path: /local/path3
  bucket: backup-bucket-path3
  bucket_path: path3
  exclusions:
    - "[Tt]humbs.db"

Contributing

If you feel like contributing to the project - there are various ways of doing so.

Support

You can buy me a coffee if you feel like supporting my motivation in working on this project. :)

paypal btcpay

s3sync-service's People

Contributors

banzai200 avatar dependabot[bot] avatar mazay avatar yevgeniy-valeyev 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.