A simple python application that makes database backups a little easier.
The purpose of this tool is to make backing up databases in bulk easy to do. This service runs database actions based on a config file. No implementation details are needed to backup you common databases.
Currently supports the following Databases for backup:
- Python 2.7
Install using virtualenv and pip.
mkdir -p ~/.venvs virtualenv ~/.venvs/dbackups source ~/.venvs/dbackups/bin/activate pip install dbackups
Install using pip.
pip install dbackups
The purpose of this package is that now backing up multiple databases within an infrastructure. You can also specify where to upload the backups.
This uses python `os.path.expanduser('~')` and translates to the following:
Add each or your databases as a section of the config file. Defining the connection and upload options.
- ### Example
[example-db] # if you want to enable the backup for this database enabled = True # the type of database db_type = postgresql # connection parameters for the DB db_host = host_of_database db_name = user db_user = postgres db_pass = password123 db_port = 5432
# these are passed into a requests.put method (futures will improve this section) upload_url = https://backups.example.com/backups/ upload_user = backupuser upload_pass = password543
Currently the one way to run the job of backing up the configured Databases from the config file is to run the command
- This will try to dump and upload all enabled databases in the config file. This is meant as a first step towards having
- python schedule its own cron and run as a systemd/init service.
### Cron Script Create a similar cron script in /etc/cron.daily/
sudo vim /etc/cron.daily/dbackups.cron sudo chmod +x /etc/cron.daily/dbackups.cron
#!/usr/bash source ~/.venvs/dbackups/bin/activate && dbackupscron
Logging for this application today is done by a config file. this can be found in the config directory under the project root. This file gets used by all of the binaries distributed by this application.
By default the logs can be found in the program directory:
The dbackupscron script has its own log allowing easy triage of the cron script
- Windows support
- Script to enter new configuration entries to the database.ini
- Add feature to clone one database to another for Development purposes
- Add cleanup for the dump files. (relying on temp dir cleanup today)
- A simple UI to see uploaded backups, and configure database entries.
## DataBase Troubleshooting
## Reporting issues
As a start please log issues or they might never be fixed!
As a guild the following is a checklist of things to check and provide in your issue.
- What OS are you running?
- Please attach the [logs](##Logging)
- Can you reproduce?
- What steps did you take to get the issue?
## Documentation Issues
For issues with the documentation or enhancements desired please log an issue with what page the issue is on and all the details about why it is not correct or clarification needed in any part of the docs.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size dbackups-0.5.4.tar.gz (13.8 kB)||File type Source||Python version None||Upload date||Hashes View|