Giter VIP home page Giter VIP logo

microbuddy's Introduction

µBuddy (MicroBuddy or MyBuddy) is a minimal approach to store an encrypted backup of your data at your buddy's location.

⚠️ WORK IN PROGRESS ⚠️ This project is in an early stage, expect a bumpy ride.

Idea

Two docker containers (source and target) are connected via a ZeroTier network. The source mounts folders from your host system, encrypts them on-the-fly and syncs them to the target.

How to run

Setup

For initial setup, we need to break the chicken and egg problem of connection and authentication.

  • Register and set up a private ZeroTier network at https://my.zerotier.com/.
  • Use the network ID as NETWORK_ID in both {source|target}/docker-compose.yaml files.
  • Generate a secure password as BACKUP_MASTERPASSWORD and configure the backup schedule as BACKUP_CRON in the target/docker-compose.yaml.
  • Launch the source container, check the SSH public key printed in the logs, copy the full line and use it as SSH_AUTHORIZED_KEY in target/docker-compose.yaml. Note down the ZeroTier address. Ignore the rest for now.
  • Send the target/docker-compose.yaml file to your buddy have them start it.
  • Back at the ZeroTier admin UI, open your network. There are now two entries in the Members section. For extra security, verify the addresses to match your and your buddy's addresses shown in the Docker logs. Activate the ☑️ Auth checkbox, give an appropriate name ("source"/"target") and not down the target's Managed IP.
  • Configure the source/docker-compose.yaml with the target's ZeroTier IP as TARGET_IP.
  • Restart the source container.

Now everything is set up for the backup. The target will accept SSH connections from the source. Upon initial connection, the target's host key will be automatically accepted and verified in the future.

Get backup master key

For disaster recovery, you should note down the master key in a secure place.

docker exec -it microbuddy-source ./gocryptfs-xray -dumpmasterkey  /var/lib/microbuddy/data/.gocryptfs.reverse.conf

Restore

c.f. Full Restore and Single File Restore

Run the commands inside the source container.

Credits

The concept of encrypted remote backups via rsync is based on this article: https://www.baeldung.com/linux/rsync-encrypted-remote-backups

microbuddy's People

Contributors

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