Skip to main content

A tarsnap backup manager

Project description

This package contains a pyCLI application that manages tarsnap backups and retention policies.

The ohsnap command

ohsnap will allow a user to create backups with retention policies.


Basic usage info is display when running ohsnap with no arguments.

$ ohsnap

usage: ohsnap [-b BINARY] {backup,list,purge} ohsnap: error: too few arguments

Combining -h or --help with any subcommand will provide more detailed info.

$ ohsnap -h backup

usage: backup [-h] [-l LOGFILE] [-q] [-s] [-v] [-C CWD] [-n NAME]
[-r RETENTION] [path [path …]]
positional arguments:
path paths to backup
optional arguments:
-h, --help show this help message and exit
-l LOGFILE, --logfile LOGFILE
 log to file (default: log to stdout)
-q, --quiet decrease the verbosity
-s, --silent only log warnings
-v, --verbose raise the verbosity
-C CWD, --cwd CWD
 directory to run the backup from
-n NAME, --name NAME
 archive name
 integer and time identifier e.g. 1h, 3d, 6y


To backup the spam and eggs directories with 1 day retention:

$ ohsnap backup –retention 1d –name spam-eggs spam eggs

To list existing archives created by the ohsnap manager:

$ ohsnap list

To purge archives that have outlived their retention policy:

$ ohsnap purge

Project details

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page