Skip to main content

bak

usage: bak [-h] [-a APPEND] [-d] [-f] [-u] Source

Backup a file or directory, defaults to same path with suffix .bak

positional arguments:
  Source                file to backup

optional arguments:
  -h, --help            show this help message and exit
  -a APPEND, --append APPEND
                        characters to append to source file instead of .bak
  -d, --date            add the date .YYYYMMDD to the end of the file
  -f, --force           overwrite backup if exists
  -u, --unbak           Unbak a file to its original location, force overwrite
                        (if your filesystem supports extended file attributes)

unbak

usage: unbak [-h] Source

Restore a file created by bak, this is the same as bak -u

positional arguments:
  Source      bak file to restore

optional arguments:
  -h, --help  show this help message and exit

Install

Install using pip https://pypi.org/project/bak/

# See if pip is install
python3 -m pip --version
# Try and install it
python3 -m ensurepip --default-pip
# Install bak
python3 -m pip install bak

unbak, bak -u

bak -u allows you to restore a file backed up using bak.

By default bak creates metadata on the .bak file https://en.wikipedia.org/wiki/Extended_file_attributes

bak would then try to restore to the path stored in the metadata, if the metadata is removed, this wont work.

Notes

It is really easy to lose the metadata, and you need to take active measures to preserve metadata if moving/copying the backup file.

http://www.lesbonscomptes.com/pages/extattrs.html

mv preserves xattrs cp will only preserve xattrs if given the option --preserve=xattr rsync 3.0.9 with option -X or --xattrs will preserve attributes

If copying to a filesystem that does not support metadata (tmpfs for example) metadata will be lost

Metadata

Release files for bak 0.4.3

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

Source distribution (sdist)

Source distribution for bak 0.4.3
File Size Uploaded Provenance
bak-0.4.3.tar.gz 9.8 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 20.6 kB

Release files / bak-0.4.3.tar.gz

Download URL bak-0.4.3.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b72e8b34b8954f758b1a5ec8f876f556df8a626d14241d8f14c6ef74fd0c3a57
BLAKE2b-256 checksum
How to use checksums
5381bdb936fff2900527db8ecb8fbba7dcf8df37f92e20e8bec17450b06465fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release files / bak-0.4.3-py3-none-any.whl

Download URL bak-0.4.3-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aad167c2ad28afa37648a595e9afeb0821dfe1b2eeeb2ccd4f6418872b9c106b
BLAKE2b-256 checksum
How to use checksums
09ab5ee12fc4ab544cb5334b93cda3a94e589cb74e01422be4732915c31f0560
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Security for bak 0.4.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.

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 release files No provenance

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