Giter VIP home page Giter VIP logo

borg-rclone-autobackup's Introduction

Borg + RClone Autobackup

Easily automate backups using Borg + RClone.

Usage Examples

Docker Run

docker run \
    -v /home/mannkind:/data:ro \
    -e BACKUP_NAME="frodo" \
    -e BACKUP_LOCATION="b2:AllMyBorgBackups/frodo" \
    -e BACKUP_SCHEDULE="0 2 * * *" \
    -e BACKUP_ENCRYPTION_KEY="One ring to rule them all oh you know the rest" \
    -e BACKUP_PRUNE="--keep-daily=7 --keep-weekly=4" \
    -e BACKUP_NOW="true" \
    -e B2_ID="kiacup6326is" \
    -e B2_KEY="12xd5t3891tqh1qqw1qq3kmhl9hbd9lfugz2j32d" \
    --restart unless-stopped \
    mannkind/borg-rclone-autobackup

Docker Compose

version: 3
services:
    borg-rclone-autobackup:
        image: mannkind/borg-rclone-autobackup
        restart: unless-stopped
        volumes:
            - "/home/mannkind:/data:ro"
        environment:
            BACKUP_NAME: "frodo"
            BACKUP_LOCATION: "b2:AllMyBorgBackups/frodo"
            BACKUP_SCHEDULE: "0 2 * * *"
            BACKUP_ENCRYPTION_KEY: "One ring to rule them all one ring to find them one ring to bring them all and in the darkness bind them"
            BACKUP_PRUNE: "--keep-daily=7 --keep-weekly=4"
            BACKUP_NOW: "true"
            B2_ID: "kiacup6326is"
            B2_KEY:"12xd5t3891tqh1qqw1qq3kmhl9hbd9lfugz2j32d"

Volumes

The following volumes can be used

  • /data - The data to backup
  • /backups - The location of the backups; backup in the container by default

Environment Variables

The following environment variables setup Borg

  • BACKUP_NAME: The backup name
  • BACKUP_ENCRYPTION_KEY: The backup encryption key
  • BACKUP_SCHEDULE: Cron scheduled string
  • BACKUP_LOCATION: The backup location e.g. b2:my-backup/some-host
  • BACKUP_PRUNE: The backup prune string e.g. --keep-daily=7 --keep-weekly=4
  • BACKUP_NOW: Runs the backup immediately, instead of waiting for the scheduled time

The following environment variables setup B2 as the RClone target

  • B2_ID: The backblaze id
  • B2_KEY: The backblaze key

The following environment variables set up Google Cloud Storage as the RClone target:

  • GCS_PROJECT_NUMBER: The project number for your Google Cloud project.

Mount a Google Cloud service account private key, in json format, to /google-service-account.json and for the backup location, use format gcs:<bucketname>/<path>.

borg-rclone-autobackup's People

Contributors

gordyf avatar mannkind avatar

Watchers

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