Simbak
For a detailed outline of simbak, visit the wiki.
Simbak is a simple backup solution that is aimed towards individuals who
just want a quick and easy way to backup their files. Backups are stored
as tar.gz files, so there is no dependence on any application to
restore your backups.
Benefits of simbak
- Simbak uses tar and gzip in order to store the backups, so that recovering the data in backups does not depend on simbak itself.
- Simbak is also very light, portable, and very easy to use, meaning that there's no large application to install.
- It's free and open source, meaning anyone can contribute or change simbak to meet their own needs.
Getting started
Installation
To install simbak you can simply use pip.
$ pip install simbak
Using simbak
Important things to know
In order to avoid any issues with backing up, you should manually create your destination paths. This will ensure the confidence in the backup working. The same goes for the logging path, if you want to save the logs to a file, make sure the directory where the log file will be stored in is already created.
Terminal
You can use simbak in many ways, the fastest way would be to use the
simbak command in the terminal directly, this will perform a normal
backup, use $ simbak --help to see your options.
$ simbak [...]
You can also use the simbak module itself through the python executable.
$ python3 -m simbak [...]
Python script
You can use simbak within your own python code, and you can make python scripts to use simbak (a python script can be prettier than shell script).
import simbak
# This will perform a normal backup.
simbak.backup(...)
If you want a quick way to enable file logging, you can set the
directory for where the logs will be stored using the
set_file_logger() function. Alternatively you can use the
python logging library
for complete custom control over logging, but it will require more
setup.
import simbak
from simbak.logging import set_file_logger
# Will put the simbak logs into this directory.
set_file_logger('/home/logs/backup-logs/')
simbak.backup(...)
Example usages
Each of these examples will achieve the same reults. They will create a
backup of /home/projects/my_project/ and /home/docs/important.txt
and it will store the backup in /remote/backups and /local/backups.
The backup will be a tar.gz file and it will have the name of
important--YYYY-MM-DD--hh-mm-ss, the time is stamped at the end of the
backup to ensure the file is unique and not conflicting with other
backups.
Python script example
# backup.py
import simbak
simbak.backup(
sources=[
"/home/projects/my_project/",
"/home/docs/important.txt",
],
destinations=[
"/local/backups/",
"/remote/backups/",
],
name="important"
)
You can then run this script through the terminal using
$ python3 backup.py.
Bash script example
Note: I am using a backslash at the end of each line in order to have a command spread across multiple lines, this helps readability.
# backup.bash
simbak \
--source \
"/home/projects/my_project/" \
"/home/docs/important.txt" \
--destination \
"/local/backups/" \
"/remote/backups/" \
--name "important"
Terminal example
Using simbak directly in the terminal isn't recommended unless you are backing up one directory or file to one location for a one time occurrence, as you can see the lines can get quite long.
$ simbak -s "/home/projects/my_project/" "/home/docs/important.txt" \
> -d "/local/backups/" "/remote/backups/" \
> --name "important"
Metadata
Release files for simbak 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simbak-0.4.2.tar.gz | 9.8 kB | Without provenance | Details for simbak-0.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simbak-0.4.2-py3-none-any.whl | Python 3 | none | any | Details for simbak-0.4.2-py3-none-any.whl |
Total release size: 21.3 kB
Release files / simbak-0.4.2.tar.gz
| Download URL | simbak-0.4.2.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7987ae88f0d5269d1179365adf953e27d7efeb046b8e0b0aacedb05863bf3ef8
|
|
BLAKE2b-256 checksum How to use checksums |
18271af6b970c505ddb7df469c2de739a1f63d76c07a1a71b83fa7a27f9ac89c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
|
Release files / simbak-0.4.2-py3-none-any.whl
| Download URL | simbak-0.4.2-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
958b2c631664490da4190ae58f98af402531916bca1fe0ac68eba1e4e3a2308f
|
|
BLAKE2b-256 checksum How to use checksums |
d9e5d43c8c710b6117e1b7cccb1c6641a644a534e2affc14bdb06eecac9c01f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
|
Security for simbak 0.4.2
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.