Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.
/ PyKup Public archive

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

License

Notifications You must be signed in to change notification settings

RobyFerro/PyKup

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages