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.
python pykup.py -d <APP_FOLDER> -cF <PATH_CONFIG_FILE> -uD <UPLOAD_DRIVER dropbox|scp> --cron
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
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
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.
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
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
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
- 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
Join in our Telegram community
Hey dude! Help me out for a couple of 🍻!