SAFER STORAGE NAS Historical management
This project implements a system level API to query and manage the SAFER-STORAGE backup and storage in space and time dimensions (hence the historical dimension). Each command of this API is designed to be either invoked directly from the shell or wrapped into an higher level API, eg. a web-ui back-end.
The SAFER-STORAGE backup system is extensively based on ZoL snapshots as found in particulat in the Proxmox VE distribution. Notice that some features may be unavailable depending on which ZoL version is available on the execution platform.
Install
This project uses python v3.7.4. We recommend installing python using pyenv eg. with the pyenv installer, as a regular (non-root) user:
$ curl https://pyenv.run | bash
$ pyenv install 3.7.4
$ pyenv local 3.7.4
Note that if python is already installed or you are already pyenv but an older version, version 3.7.4 may not be available. Simply erase your previous pyenv installation an reinstall from scratch (or use vagrant, for a clean fresh start).
This package is then available through PyPI using the following command:
$ pip install --upgrade safer_hist_pkg
Usage
safer : main command
The commands of this package are part of a module named safer_hist. For convenience, we also recommend defining the following funtion in your shell (eg. in your .bashrc):
function safer()
{
case $1 in
help|lssnaps|genmeta|lsuntil|lsalltime|restore)
subcmd=$1
shift
python -m safer_hist ${subcmd} "$@"
;;
*)
python -m safer_hist help "$@"
;;
esac
}
safer genmeta: Snapshot meta-info generation
Generates a snapshot meta file for the snapshot @<snapshot> of the (ZFS) dataset <dataset>. By default the output is written to a file named .zfsmeta_<snapshot> at the root of the dataset. If -o option is given, output is written to the specied filename or to stdout if - (minus) is given instead of a filename.
$ safer genmeta [-o file|-] dataset@snapshot
safer lssnaps: Snapshot list
safer lsuntil: Merge target dir content from snapshots until
safer lsalltime: Marge target dir content from all snapshots
safer restore: Restore file from snapshot
Packaging and deploying to PyPI
(reminder, see this tuto)
Install building dependencies as follows:
$ python3 -m pip install --upgrade setuptools wheel
Build package as follows:
$ python3 setup.py sdist bdist_wheel
Upload to PyPI server:
$ python3 -m twine upload dist/*
License
Author(s)
- DALLE, Olivier (First.LAST@safer-storage.com)
Metadata
Release files for safer-hist 0.0.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 | |
|---|---|---|---|
| safer-hist-0.0.2.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| safer_hist-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.7 kB
Release files / safer-hist-0.0.2.tar.gz
| Download URL | safer-hist-0.0.2.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96d00fde0e184d1ba21aae7e37123ef136c80857a748e77e6edf27ef9d078669
|
|
BLAKE2b-256 checksum How to use checksums |
969f09ccf1cad400da038c94d7d6e3375a4f428d7625a7beb8537ce70a4ebbe5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Release files / safer_hist-0.0.2-py3-none-any.whl
| Download URL | safer_hist-0.0.2-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
339e9b00d9599f589dbc0717ac6b0e7d33a1f41873b086266dd467357c915800
|
|
BLAKE2b-256 checksum How to use checksums |
c24b3a2a138a667ad4b6bcb40431d4e47608e9e509472c6db6e0df6bb76f39ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|