GithubHelp home page GithubHelp logo

baltuonis / lonebackup Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 56 KB

Simple, zero-dependencies, standalone backup utility for uploading compressed MySQL/MariaDB dumps to Azure Blob Storage.

C# 96.50% Shell 2.25% Dockerfile 1.25%

lonebackup's Introduction

LoneBackup

A simple single executable tool to back up your MySQL/MariaDB databases to Azure Blob Storage.

Purpose: no docker requirement, no fancy configuration files, low learning curve

Quick start

SSH to your server

mkdir -p /var/lonebackup && cd "$_"
# Get the latest release
wget https://github.com/baltuonis/lonebackup/releases/download/v1.0.2/lonebackup-x64

vim config.json

config.json

{
  "AzureStorageConnectionString": "storagestring",
  "AzureStorageContainer": "container",
  "AzureStorageFolder": "folder",
  "ArchivePassword": "abcd",
  "MySQL": {
    "Host": "localhost",
    "Port": 3306,
    "User": "root",
    "Pwd": "toor",
    "Databases": [
      "dbname1"
    ]
  },
  "CreateLocalFile": false
}

Run manual backup

./lonebackup-x64 

Then create a cron entry

crontab -e
5 1 * * * cd /var/lonebackup && ./lonebackup-x64

Docker deployment (for old machines)

Use docker when having dependency problems on remote machines (old servers):

  1. Copy lonebackup to remote machine
  2. Prepare config.json
  3. Copy Dockerfile-remote to remote Dockerfile
  4. Run commands:
docker build -t lonebackup . 
docker run --rm --network host lonebackup 

TODO:

  1. Backup rotation
  2. App Insights logging
  3. Upgrade Azure Storage packages
  4. Create a GitHub action for releases

lonebackup's People

Contributors

baltuonis avatar dependabot[bot] avatar

Stargazers

 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.