Skip to main content

Creates backups of your files and directories.

Project description

Simple utility that makes backups of your files/directories.

https://user-images.githubusercontent.com/11185582/48983793-ab82df00-f0f3-11e8-8727-c665b92bdb31.gif

Installation

sudo 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.

Donations

It is absolutely fine if you use this software for free for commercial or non-commercial purposes. On the other hand, if you would like to repay author’s efforts you are welcome to use following button:

https://www.paypalobjects.com/en_US/PL/i/btn/btn_donateCC_LG.gif

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bkp-0.1.8.tar.gz (7.7 kB view details)

Uploaded Source

File details

Details for the file bkp-0.1.8.tar.gz.

File metadata

  • Download URL: bkp-0.1.8.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for bkp-0.1.8.tar.gz
Algorithm Hash digest
SHA256 7f735a9200eb9db31f8642987b760e7210c92003d49e72f661e19920aaefd4d2
MD5 dfde15a4c46cf3b3bd577dcaf5c8aa17
BLAKE2b-256 e01a624b777c4c140b3e81e98bd7feddfec3c4e4a5ed8f5f52fdd4ca36864a04

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page