npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

zsnapper

v2.0.0

Published

A ZFS snapshot service

Downloads

27

Readme

  ____     ____    ___      __     _____   _____      __   _ __ 
 /\_ ,`\  /',__\ /' _ `\  /'__`\  /\ '__`\/\ '__`\  /'__`\/\`'__\
 \/_/  /_/\__, `\/\ \/\ \/\ \L\.\_\ \ \L\ \ \ \L\ \/\  __/\ \ \/
   /\____\/\____/\ \_\ \_\ \__/.\_\\ \ ,__/\ \ ,__/\ \____\\ \_\
   \/____/\/___/  \/_/\/_/\/__/\/_/ \ \ \/  \ \ \/  \/____/ \/_/
                                     \ \_\   \ \_\
                                      \/_/    \/_/

This is a ZFS snapshotting service for Solaris, OpenIndiana, SmartOS and friends.

Installation

# npm -g install zsnapper

Configure

Copy the config file zsnapper.json.sample (probably installed in /usr/local/lib/node_modules/zsnapper by npm) to /etc/zsnapper.json and update it with your desired configuration.

It's a JSON file of the format:

{
    <dataset name>: {
        <snapshot name>: {
            "when": <cron string>,
            "count": <number of snapshots>,
            "exclude": [ <dataset to be excluded>, ... ]
        },
        <snapshot name>: {
            "when": <cron string>,
            "count": <number of snapshots>,
            "exclude": [ <dataset to be excluded>, ... ]
        }
    },
    <dataset name>: {
        ...
    }
}

Where:

  • dataset name is a name of a dataset to snapshot. Example: zones.

  • snapshot name is a base to build snapshot names of. The current date and time will be appended. Example: daily which will result in snapshot names of the type daily-20120515T1314900Z.

  • cron string is a cron-format description of when the snapshot should be taken. man 5 crontab for details. Example: 15 0 * * 1 for snapshots at 00:15 the first of every month.

  • number of snapshots is the number of snapshots that should be kept historically before being destroyed.

  • exclude is a list of dataset names (under the main dataset name) that should not be snapshotted. Example: [ "zones/swap", "zones/dump" ].

Start

To test the setup, start the service (as root) with the name of the config file as the only parameter.

# /usr/local/bin/zsnapper /etc/zsnapper.json

A better alternative, once everything seems to work as intended, is to use the accompanying SMF manifest. Copy zsnapper.xml from /usr/local/lib/node_modules/zsnapper to your home directory and edit it to suit your installation. The only things you need to modify are the paths to the zsnapper executable and the zsnapper.json config file. Then import it:

# svccfg import zsnapper.xml

The service should be started automatically, which you can verify:

# svcs site/zsnapper
STATE          STIME    FMRI
online         10:56:26 svc:/site/zsnapper:default