Skip to main content

A system level API to query and manage the SAFER-STORAGE backup and storage in space in time dimensions

Project description

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

Licensed under the EUPL

Author(s)

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

safer-hist-0.0.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

safer_hist-0.0.2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file safer-hist-0.0.2.tar.gz.

File metadata

  • Download URL: safer-hist-0.0.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for safer-hist-0.0.2.tar.gz
Algorithm Hash digest
SHA256 96d00fde0e184d1ba21aae7e37123ef136c80857a748e77e6edf27ef9d078669
MD5 233db8e3bd65e55864e1c09d41f77a50
BLAKE2b-256 969f09ccf1cad400da038c94d7d6e3375a4f428d7625a7beb8537ce70a4ebbe5

See more details on using hashes here.

File details

Details for the file safer_hist-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: safer_hist-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for safer_hist-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 339e9b00d9599f589dbc0717ac6b0e7d33a1f41873b086266dd467357c915800
MD5 27219fa033c7f83ca425f7037f68b9bc
BLAKE2b-256 c24b3a2a138a667ad4b6bcb40431d4e47608e9e509472c6db6e0df6bb76f39ab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page