praekelt.recipe.backup
Filesystem and database backup Buildout recipe.
Creates a bin/ script with which you can easily create backups of any path and/or database. Uses rsync to create incrementally complete backups, see: Do-It-Yourself Backup System Using Rsync.
NOTE: This recipe is under active development and has not been fully tested in a production environment. Use at your own risk.
Usage
Add a part in buildout.cfg like so:
[buildout] parts = backup [backup] recipe = praekelt.recipe.backup prefix = foobar local_storage_path = /var/backups
Running the buildout will add a backup script with the same name as your backup part in the bin/ directory. In this case bin/backup. The resulting script will create timestamped backups of the buildout path prefixed with the string foobar locally in /var/backups.
Options
- prefix
String prefixed to backup directory names. Required.
- source_path
Path to recursively backup. Defaults to the buildout directory.
- database_engine
Type of database to backup. Supported options: mysql or postgres.
- database_name
Name of the database to backup.
- database_username
Username of the database to backup.
- database_password
Password of the database to backup.
- local_count
Number of backups to keep locally. As new backups are created older backups are deleted. Defaults to 3.
- local_storage_path
Local path in which to store backups. Make sure the user running the backup script has appropriate rights to this path. Required.
- remote_host
Hostname of remote host on which to mirror local backups.
- remote_storage_path
Remote path in which to store backups. Make sure the user running the backup script has appropriate rights to this path (via rsync).
Note: rsync functionality is limited to key based authentication. Make sure to setup your keys appropriately for passwordless remote authentication.
Full Example
The following example illustrates all available options:
[buildout] parts = backup [backup] recipe = praekelt.recipe.backup prefix = foobar local_count = 2 local_storage_path = /var/backups source_path = /var/foobar remote_host = www.my-backup-server.com remote_storage_path = /var/backups/foobar database_engine = postgres database_name = foobar_db database_username = db_username database_password = db_password
The resulting script will create timestamped backup folders prefixed with the string foobar locally in /var/backups. The backup will contain all the files found in /var/foobar as well as a database dump of the postgres database named foobar_db. A copy of each created backup will be sent to www.my-backup-server.com via rsync and stored in the /var/backups/foobar path. Only the latest 2 backups will be retained locally. Older backups will be deleted automatically.
Changelog
0.0.3
Complete refactor to use rsync.
0.0.2
Dereference symbolic links.
0.0.1
Initial Release
Metadata
Release files for praekelt.recipe.backup 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| praekelt.recipe.backup-0.0.3.tar.gz | 5.8 kB | Without provenance | Details for praekelt.recipe.backup-0.0.3.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| praekelt.recipe.backup-0.0.3-py2.6.egg | Legacy Egg format | - | - | Details for praekelt.recipe.backup-0.0.3-py2.6.egg |
| praekelt.recipe.backup-0.0.3-py2.5.egg | Legacy Egg format | - | - | Details for praekelt.recipe.backup-0.0.3-py2.5.egg |
Total release size: 22.9 kB
Release files / praekelt.recipe.backup-0.0.3.tar.gz
| Download URL | praekelt.recipe.backup-0.0.3.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9113f7003c892a78f6da183636026c0d1d2d7c0e959bedd222a633ef1216c1f8
|
|
BLAKE2b-256 checksum How to use checksums |
3226500a7bde3fe0ad0d53fc4d4d4340aa4b445f555cc54ae5c08680d79eef84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / praekelt.recipe.backup-0.0.3-py2.6.egg
| Download URL | praekelt.recipe.backup-0.0.3-py2.6.egg |
|---|---|
| Size | 9.7 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
5566eaed0924ca193e7f07e01a038012b56107202c38914fc5b12375f815f2f9
|
|
BLAKE2b-256 checksum How to use checksums |
07c47537d7cba077164b545a095c8ff383140206078c094a9afff5fff42510f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / praekelt.recipe.backup-0.0.3-py2.5.egg
| Download URL | praekelt.recipe.backup-0.0.3-py2.5.egg |
|---|---|
| Size | 7.5 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
e83f7c2636cce63bcd5d1100c17a32f9318570eb6cff133b078c33dcc48737a0
|
|
BLAKE2b-256 checksum How to use checksums |
e66e9c342ac3a119b7c6077e791b09c1105468dd21cc3577ca4b387fffe1a0db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for praekelt.recipe.backup 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.