snapshooter

command
v2.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2020 License: MIT Imports: 4 Imported by: 0

README

snapshooter

Docker Cloud Build Status

Usage

usage: snapshooter --repo.name=REPO.NAME [<flags>]

Take snapshots of Elasticsearch cluster on a schedule, and clean up old ones with downsampling.

Flags:
      --help                   Show context-sensitive help (also try --help-long and --help-man).
      --hourly=HOURLY          Number of hourly snapshots to keep.
      --daily=DAILY            Number of daily snapshots to keep.
      --weekly=WEEKLY          Number of weekly snapshots to keep.
      --monthly=MONTHLY        Number of monthly snapshots to keep.
      --yearly=YEARLY          Number of yearly snapshots to keep.
  -r, --repo.name=REPO.NAME    The name of the snapshot repository to use.
      --repo.type=REPO.TYPE    Ensure a snapshot repository with this type and --repo.name exists.
      --repo.settings=REPO.SETTINGS ...
                               Settings to create snapshot repository with. See also: --repo.name and --repo.type.
  -d, --delete                 Delete old snapshots. Not enabled by default for safety.
      --dry-run                If set, print actions without taking them.
  -e, --elasticsearch.url=http://127.0.0.1:9200 ...
                               URL(s) of Elasticsearch.
      --log.level=INFO         Set logging level.
      --serve.port=8080        Port on which to expose healthchecks and Prometheus metrics.
      --serve.metrics="/metrics"
                               Path at which to serve Prometheus metrics.
      --serve.live="/livez"    Path at which to serve liveness healthcheck.
      --serve.ready="/readyz"  Path at which to serve readiness healthcheck.

Example

$ ./snapshooter \
    --repo=backups --type=s3 --settings bucket=my_bucket \
    --window P1M=PT1H \
    --window P3M=P1W \
    --window P3Y=P1M \
    --delete

Create a S3 snapshot repository named "backups" (if one doesn't already exist).

Then create hourly snapshots that are kept for one month, weekly snapshots that are kept for 3 months, and monthly snapshots that are kept for 3 years. Delete old snapshots.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL