A Python package/script to create efficient backups using ssh and rsync
Currently only needed for testing. Requirements: pip, virtualenv
To create the virtual environment and install any necessary packages:
virtualenv -p /path/to/python3 localenv
source localenv/bin/activate
pip install -r requirements.txt
This script uses the backup_manager
class to create a single backup and remove
any old backups according to command-line options and configuration files.
To use "create_backup":
- To list available command-line options use:
create_backup -h
- A sample configuration file is included as:
sample.conf
- Configure create_backup by using a combination of command-line options and/or configuration files
While the create_backup script is designed to be used as a cron job, it might not be a bad idea to watch/log the first few to make sure that the configuration is correct.
Documentation can be found in the source code and compiled using Doxygen. To build HTML documentation (assuming Doxygen is installed):
To build documentation:
cd docs/
make
In progress. To run all tests, make sure you have the environment set up properly, and then:
source localenv/bin/activate
(if needed)cd testing/
python -m unittest
You can also run a specific test case by providing the module and test case name
to the command: python -m unittest
. This should be covered in the
documentation of python's unittest module, so you can read more there.