Giter Site home page Giter Site logo

poc-gocron's Introduction

๐Ÿš€ poc-gocron: A Simple S3 Backup Tool ๐Ÿš€

๐ŸŒŸ Overview

It's a sleek and simple backup tool crafted in Go, designed as a proof of concept (POC) for gocron. ๐Ÿ› ๏ธ Its mission? To run sets of commands, perform backups, and safely tuck those backups into S3-compatible storage. Whether you're backing up your pet project or enterprise data, poc-gocron offers an easy, customizable solution for all your backup needs.

โœจ Features

  • โฐ Scheduled Backups: Set and forget with cron syntax to automate backups.
  • ๐Ÿ›  Flexible Script Execution: Runs your custom scripts to get those backups ready.
  • ๐ŸŒ Environment and Custom Variable Support: Leverages both environment and specially crafted variables within your scripts.
  • ๐Ÿ”„ S3-Compatible Uploads: Sends your backups straight to any S3-compatible storage.
  • ๐Ÿณ Docker Support: Ready to sail within Docker containers for consistent and isolated backup environments.

๐Ÿ“‹ Requirements

  • Go Environment: Ready to build and run the application.
  • S3-Compatible Storage: Must have the necessary access credentials.
  • Docker Environment (Optional): For those who prefer a containerized deployment.

โš™๏ธ Configuration

๐ŸŒ Environment Variables

Set up these environment variables to get started:

S3_ENDPOINT=your_s3_endpoint  # URL to your S3-compatible storage
S3_REGION=your_s3_region      # The storage region
S3_BUCKET=your_bucket_name    # The name of the bucket where backups will be stored
S3_SECRET_KEY=your_secret_key # Your S3 storage secret key
S3_ACCESS_KEY=your_access_key # Your S3 storage access key
CONFIG_PATH=path_to_config.yml # Path to the backup configuration file
S3_AUTO_CREATE_BUCKET=true or false # Whether to create the bucket if it doesn't exist

๐Ÿ—‚ Backup Configuration (config.yml)

Craft a config.yml in your root directory or specified CONFIG_PATH to define your backup jobs. Peek at config.example.yaml for a sample setup!

๐Ÿณ Docker Usage

Kick off with this Dockerfile, prepped with essential tools (e.g., SQL clients) for your backup journey:

FROM ghcr.io/siddhant-k-code/poc-gocron:main
ENV TZ="Asia/Kolkata"
COPY config.yml config.yml

Feel free to beef up your Dockerfile with extras like rsync, ssh, etc., depending on your backup needs.

๐Ÿšข Running the Docker Container

Fire up your Docker container with all the needed environment variables:

docker run -e S3_ENDPOINT=... -e S3_REGION=... -e S3_BUCKET=... \
  -e S3_SECRET_KEY=... -e S3_ACCESS_KEY=... -e CONFIG_PATH=config.yml \
  -e S3_AUTO_CREATE_BUCKET=true --name my-backuper my-backup-image

๐Ÿ›  Build and Installation

Build it straight from the source:

go build -o poc-gocron .

Ready to run:

./poc-gocron

Make sure all your environment settings are dialed in before you hit go!

๐ŸŽ‰ Conclusion

poc-gocron makes setting up and managing automated backups a breeze, safeguarding your data with ease. With Docker by its side and straightforward setup, it fits seamlessly into any workflow, ensuring your data's safety and your peace of mind. Happy backing up! ๐ŸŽˆ

poc-gocron's People

Contributors

siddhant-k-code avatar

Stargazers

 avatar  avatar  avatar  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.