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'])
Author
Joseph Ernest
License
MIT
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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size diskbackup-0.0.3-py3-none-any.whl (3.8 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size diskbackup-0.0.3.tar.gz (3.3 kB) | File type Source | Python version None | Upload date | Hashes View |
Hashes for diskbackup-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 631a820a537ce76db77bc976543af9c635e6797025ec2c8e37d10acf87ec1d23 |
|
MD5 | 3a29f262bf61d2b482657a698a694d86 |
|
BLAKE2-256 | 78b626e8fe7fc2bec3bbf596d77d606fa3be3be21417a600f6f73f104480b1b2 |