Simple backup tool
Project description
diskbackup
diskbackup is a very simple backup tool. Main features:
-
The directory
dest
will be a clone ofsrc
(and its subdirectories). New files or modified files will be copied, and files indest
which are not insrc
will be removed. -
The backup is incremental: only new or modified files will be copied.
filename
+file size
+modification time
are used to do the comparison between source and destination files. -
Supports exclude patterns (case insensitive)
-
Follows symbolic links
-
Works when the
dest
is a network shared folder (tested on Windows) -
The source code is ~50 lines of code: you don't even need to scroll in your text editor to read the code, it takes only one page ;)
Installation and usage
You need Python 3.6+, and to do:
pip install diskbackup
(An alternative installation method is to just copy the single file diskbackup.py
where you want to use it.)
This is how to use it:
from diskbackup import backup
backup(src=r'd:\docs', dest=r'i:\docs')
backup(src=r'd:\docs', dest=r'i:\docs', fake=True) # fake run, no change on destination
backup(src=r'd:\docs', dest=r'i:\docs', exclude=['excluded_dir', '.mp4']) # the src file list will ignore these patterns
backup(src=r'd:\docs', dest=r'i:\docs', exclude=['excluded_dir', '.mp4'], excludefromdest=True) # the src and dest file lists will ignore these patterns
Author
Joseph Ernest
License
MIT
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
Built Distribution
File details
Details for the file diskbackup-0.0.4.tar.gz
.
File metadata
- Download URL: diskbackup-0.0.4.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f41be9971d7744430c3e7e5daf534da2aad9603d6e4e94edb83d390106d4683f |
|
MD5 | 1e30c7de2aace14262120209e81d28be |
|
BLAKE2b-256 | 4934d15a740365ef60d20a2c5165e2df81744d9827b6d59d24160d6e52ae13c2 |
File details
Details for the file diskbackup-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: diskbackup-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d914dd164f7be41fe41ab9cfd55c2a556d944667a1881709c0a44708cf5754a |
|
MD5 | b10c8f82fc2739ca0ecedf16993af7eb |
|
BLAKE2b-256 | 9aea1cc8aebddc526d1e463b4f8af81780593910853123452816fa04f714a623 |