create rolling backups of a file
Project description
rolling-backup
create rolling backups of a file
installation
$ pip install rolling-backup
Usage
from rolling_backup import backup
backup(filename, num_to_keep=12)
returns True on success otherwise False
Creates up to 12 rolling backups of file filename by appending zeroes to the filename.
Example Usage
>>> import os
>>> from rolling_backup import backup
>>> os.listdir(".")
['file.txt']
>>> backup('file.txt', num_to_keep=12)
True
>>> os.listdir(".")
['file.txt', 'file.txt.00']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rolling-backup-0.0.1.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rolling-backup-0.0.1.tar.gz.
File metadata
- Download URL: rolling-backup-0.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2888f5dae72b7a2078195f69d174f14ff7768f86400473fd2eeb3c60b0a237cf
|
|
| MD5 |
f574629301e5c778c2be48212a33af0e
|
|
| BLAKE2b-256 |
bf2b8d75e1385e13506f4a292df2d1b03135c988101ce6479a3b0ca0889f9fd9
|
File details
Details for the file rolling_backup-0.0.1-py3-none-any.whl.
File metadata
- Download URL: rolling_backup-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1648907ae1c2b8976fa867cc6d950a3b0594ff338ee8049a114719bc0475e1ab
|
|
| MD5 |
f3a45a1dcda1e7837805033de7b87cdc
|
|
| BLAKE2b-256 |
32e7db8986f90d9816d81fcc6098a2ff9fb5212d2b5b0249d6353bd25edeef53
|