Skip to main content

bkp

Github - Tests PyPI - Version PyPI - License PyPI - Downloads

Simple utility that makes backups of your files/directories.

Features

  • Work with separate files or entire directories.
  • Creates simple copy or TAR archive.
  • Optionally append metadata: author, creation time, commit message (applies only to TAR archives).

Installation

pip install bkp

Compatibility

  • This software is expected to work with Python 3.6, 3.7 and compatible.
  • It has never been tested under operating systems other than Linux.
  • For editing messages interactively (-M switch) you need either have vi installed, or set EDITOR system variable to relevant value.

Usage

Creating Backups & Restoring

Provided that we have a file or directory: foo/bar/baz

# Create a copy:   
bkp foo/bar/baz

# Following copy will be created: foo/bar/baz.b01
# Invoking command again will create foo/bar/baz.b02 etc.

# Restore your file or directory:
bkp -r foo/bar/baz.01

# This will create/overwrite original file/directory: foo/bar/baz

Note that multiple files can be specified in the command line. Output files are always created in the same directory where corresponding input files are located, no matter what CWD at the time.

Working With Archives

Alternatively -a flag can be used to create tar archive instead of a simple copy. Also -m can be used to add comments.

# Create an archive
bkp -am "initial version" foo/bar/baz

# Comment and other details can be obtained by invoking:
bkp -i foo/bar/baz.b03

For more options and explanations invoke bkp --help.

Development

Preparing environment:

python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
python3 -m pip install -r requirements-dev.txt
python3 -m pip install -e .

Modifying dependencies:

# edit setup.py
# edit requirements*.in
pip-compile
pip-sync
# git add... commit... push...

Testing:

pytest

Releasing:

echo $VERSION > bkp/VERSION
twine upload dist/bkp-$VERSION.tar.gz
git tag $VERSION
git push --tags

Disclaimer

Author doesn't take any responsibility for loss or damage caused by this utility. You are using it on your own risk.

Metadata

Release files for bkp 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bkp 1.0.0
File Size Uploaded
bkp-1.0.0.tar.gz 7.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bkp 1.0.0
File Interpreter ABI Platform
bkp-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.1 kB

Release files / bkp-1.0.0.tar.gz

Download URL bkp-1.0.0.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0ab68bc0f7f20340e324d36974df71c0d9c74895946a0d2ae9c19640fb4e1877
BLAKE2b-256 checksum
How to use checksums
8e19210dd1d56f692b593458dfe031e1f8ca3d2191e32e6484157a63fe1a74b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.10.6 Linux/5.15.0-56-generic

Release files / bkp-1.0.0-py3-none-any.whl

Download URL bkp-1.0.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d56aaba86873ce19a53745bed3a48787ff4263c8bff2af2e69c41391b8710b08
BLAKE2b-256 checksum
How to use checksums
dc5c52737a607331a19ed0d8cc15d61e365003d64d33f8fe68bef0e8df24fded
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.10.6 Linux/5.15.0-56-generic

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.8

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.1

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page