GithubHelp home page GithubHelp logo

robyferro / pykup Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 1.0 7.96 MB

A simple tool to manage and schedule backup for any web app

License: MIT License

Python 100.00%
backup backup-manager backup-utility webapp webapp-backup

pykup's Introduction

Pykup

PyKup - WebApp backup manager

A simple tool to easily manage and schedule backup for any web app! With PyKup you can backup your web applications in just one command. Everything will be compressed and stored in your favorite storage location.

Usage

python pykup.py -d <APP_FOLDER> -cF <PATH_CONFIG_FILE> -uD <UPLOAD_DRIVER dropbox|scp> --cron 

Multiple application backup

With crontab integration you can schedule multiple application backup:

python pykup.py -d <APP_FOLDER_1> -cF <PATH_CONFIG_FILE_1> -uD <UPLOAD_DRIVER dropbox|scp> --cron 
python pykup.py -d <APP_FOLDER_2> -cF <PATH_CONFIG_FILE_2> -uD <UPLOAD_DRIVER dropbox|scp> --cron 

Getting started

First of all ensure that Python 3 is installed on your machine, then you can get all file with:

git clone https://github.com/RobyFerro/PyKup.git

Install all requirements with:

pip install -r requirements.txt

After that you can get all information by typing:

usage: pykup.py [-h] -d DIRECTORY [-n APP_NAME] -cF CONFIG_FILE
                [-uD UPLOAD_DRIVER] [-rF REMOTE_FOLDER] [--cron]

PyBack WebApp backup utils

optional arguments:
  -h, --help         show this help message and exit
  -d DIRECTORY       Set a backup directory
  -n APP_NAME        Define application name
  -cF CONFIG_FILE    Define configuration file
  -uD UPLOAD_DRIVER  Define upload driver dropbox|scp
  -rF REMOTE_FOLDER  Define scp remote folder
  --cron             Set command in crontab
  --telegram         Send telegram notification after backup

Config

To config your web app you should rename config.ini.example in config directory and replace all values with your parameters.

You can set multiple .ini file to schedule multiple backup

first-app.ini
second-app.ini
third-app.ini

This trick it will be useful combinated with --cron option.

Crontab events

To set the current command inside linux crontab job you've just to specify --cron option. Use the following command to show all existing crontab job:

crontab -l

Dropbox integration

To upload your backups on dropbox you've to create a new application inside your Dropbox account and follow this steps:

  • Select Dropbox API
  • Select "App folder"
  • Select your app name

Once created you've to generate a new access token and put it on config/integrations/dropbox.json

Telegram confirm notification

To send notification to your own telegram channel you've to create a Telegram bot

  • Insert your TOKEN and Telegram user ID in config.ini file

Todo list:

  • File backup and compression
  • Log activity
  • PostgreSQL dump
  • MySQL dump
  • Dropbox integration
  • SCP Sync
  • Rsync integration
  • Crontab integration
  • Telegram confirm notification
  • Telegram bot remote control
  • Google Drive Integration

Need help?

Join in our Telegram community

Support on Beerpay

Hey dude! Help me out for a couple of ๐Ÿป!

Beerpay Beerpay

pykup's People

Contributors

robyferro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

shinroo

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.