Skip to main content

A set of supplementary commands to be used with snapper

Project description

https://badge.fury.io/py/snapperS.svg https://travis-ci.org/ddworken/snapperS.svg?branch=master

A set of subcommands to supplement snapper usage. Tested on Ubuntu 15.04 and 15.10 with snapper v0.2.4 and btrfs-progs v4.0 (bug reports welcome!).

usage: snapperS [-h] [-d DIRECTORY] [-v] {cat,backup,restore,rm,list} ...

snapperS: A variety of supplemental snapper subcommands

optional arguments:
  -h, --help            show this help message and exit
  -d DIRECTORY, --directory DIRECTORY
                        Directory containing the snapshots
  -v, --verbose         Enable verbose logging. If you are experiencing difficulties with this program, try with -v for debugging.

Subcommands:
  Restore a snapshot from a file generated with snapperS backup.
  A more comprehensive version of snapper list that includes information on space usage.
  Backup a specified snapshot to a file via btrfs send.
  Delete a specified file from either a range of snapshots or from all snapshots.
  Read a specified file from a specified snapshot.

  {cat,backup,restore,rm,list}

Subcommands

snapperS cat

usage: snapperS cat [-h] -f ~/file.txt -s SNAPSHOT

Read a specified file from a specified snapshot.

optional arguments:
  -h, --help            show this help message and exit
  -f ~/file.txt, --filename ~/file.txt
                        The file to cat
  -s SNAPSHOT, --snapshot SNAPSHOT
                        The snapshot to view

snapperS rm

usage: snapperS rm [-h] -f ~/largeFile.img [-r 1..42] [--recursive]

Delete a specified file from either a range of snapshots or from all
snapshots.

optional arguments:
  -h, --help            show this help message and exit
  -f ~/largeFile.img, --filename ~/largeFile.img
                        Delete a file from all past snapshots.
  -r 1..42, --range 1..42
                        The range of snapshots to delete the file from in the
                        form of startPoint..endPoint (e.g. 2..5)
  --recursive           Delete recursively (i.e. a folder)

snapperS backup

usage: snapperS backup [-h] -b ~/BTRFS_Backup.send -s 42

Backup a specified snapshot to a file via btrfs send. It is recommended to compress this file.
    -In order to restore this file, run `cat backup | btrfs receive /mnt/subvol`
    -If you want to sync your backups to another BTRFS filesystem, ButterSink is better suited for that purpose.

optional arguments:
  -h, --help            show this help message and exit
  -b ~/BTRFS_Backup.send, --backup ~/BTRFS_Backup.send
                        The location to store the backup
  -s 42, --snapshot 42  The number of the snapshot you want to backup

snapperS restore

usage: snapperS restore [-h] -b ~/BTRFS_Backup.send -r ~/newRestoredSubvolume/

Restore a snapshot from a file generated with snapperS backup.

optional arguments:
  -h, --help            show this help message and exit
  -b ~/BTRFS_Backup.send, --backup ~/BTRFS_Backup.send
                        The location of the backup.
  -r ~/newRestoredSubvolume/, --restoreLocation ~/newRestoredSubvolume/
                        The path to where you want to restore the backup.

snapperS list

usage: snapperS list [-h]

A more comprehensive version of snapper list that includes information on
space usage.

optional arguments:
  -h, --help  show this help message and exit

Installation

pip install snapperS

or

git clone https://github.com/ddworken/snapperS.git
cd snapperS
python setup.py install

Source

Source is available on at github.com/ddworken/snapperS

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

snapperS-1.1.8.tar.gz (12.9 kB view details)

Uploaded Source

File details

Details for the file snapperS-1.1.8.tar.gz.

File metadata

  • Download URL: snapperS-1.1.8.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for snapperS-1.1.8.tar.gz
Algorithm Hash digest
SHA256 031b878ac78d1afc54cc84f153acfd4f7b7cf583e5451900fb6d443bb3f27e2d
MD5 12f710173cf4d34b022e0a6be1763346
BLAKE2b-256 8f9624c82ef8988b2af95ac5b458e5cfad819c5ae948cec9960287f67dd95349

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