Git Product home page Git Product logo

docker-simple-remote-borg-backup's Introduction

Simple encrypted remote daily backups using borgbackup

(WIP)

This is a simple container that can be used to set up scheduled, hassle-free, encrypted backups to an insecure remote host.

The backups will run daily at 2AM and will (by default) store the last 7 daily snapshots, the last 4 weekly ones and the last 6 monthly ones.

Prerequisites

CLIENT is the host you will be running the container on. SERVER is the host that will store the remote backup.

  1. The SERVER needs to have an SSH daemon running with pubkey authentication enabled.
  2. The SERVER needs to have borg installed.

Set-up

On the SERVER, create a new user that will host the backups: adduser *username*

Generate an SSH keypair with ssh-keygen. Deploy the public key to username@SERVER:.ssh/authorized_users

Store the public and private key in a folder named ssh. Create a file ssh/known_hosts and store the SERVER's hostname and fingerprint inside. Copy the folder ssh to the CLIENT.

Run the container

docker run --rm -it \
    -e REPOSITORY=user@SERVER:backup-name \
    -e PASSPHRASE=encryption_passphrase \
    -v *path_to_ssh*:/root/.ssh:ro \
    -v *folder_to_back_up*:/data:ro \
    psegina/simple-remote-borg-backup

In docker-compose

backup:
    image: psegina/simple-remote-borg-backup
    environment:
        - REPOSITORY=user@SERVER:backup-name
        - PASSPHRASE=supersecretpassphrase
    volumes:
        - ./ssh:/root/.ssh:ro
        - ./data:/data:ro
    restart: always

docker-simple-remote-borg-backup's People

Contributors

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