TABLESNAP(1)

NAME
tablesnap - cassandra backup utility

SYNOPSIS
tablesnap [-hraB] [-k AWS_KEY ] [-s AWS_SECRET ] [--aws-token AWS_TOKEN ] [-p PREFIX ] [--without-index] [--with-sse] [--keyname-separator KEYNAME_SEPARATOR ] [-t THREADS ] [-n NAME ] [--md5-on-start] [--listen-events {IN_MOVED_TO,IN_CLOSE_WRITE} [-e EXCLUDE ] [-i INCLUDE ] [--max-upload-size MAX_UPLOAD_SIZE ] [--multipart-chunk-size MULTIPART_CHUNK_SIZE ] bucket paths [paths ...]

DESCRIPTION
tablesnap uses inotify to monitor a directory for events and reacts to them by spawning a thread to upload new files to Amazon S3, along with a JSON-formatted list of what other files were in the directory at the time of the copy. bucket is the name of the S3 bucket to upload files to and paths is one or more directories to monitor for changes.

OPTIONS

-k, --aws-key=AWS_KEY
    Amazon S3 Key (defaults to AWS_ACCESS_KEY_ID in environment)

-s, --aws-secret=AWS_SECRET
    Amazon S3 Secret (defaults to AWS_SECRET_ACCESS_KEY in environment)

--aws-token=AWS_SECURITY_TOKEN
    Amazon S3 Token (defaults to AWS_SECURITY_TOKEN in environment)

-r, --recursive
    recursively watch the given path(s) for new SSTables

-a, --auto-add
    automatically start watching new subdirectories within path(s)

-B, --backup
    backup existing files to S3 if they're not already there

-p, --prefix
    set a string prefix for files uploaded to S3

--without-index
    do not store a JSON representation of the current directory listing (-listdir.json) in S3 when uploading a file

--with-sse
    enable server-side encryption for all uploads to S3

--keyname-separator=SEPARATOR
    separator between the filename and path in S3 keys (default ':')

-t, --threads=THREADS
    number of writer threads (default 4)

-n, --name=NAME
    use this name to identify files uploaded from this host (defaults to your host's FQDN)

--md5-on-start
    compute the MD5 checksum of every monitored file on startup

--listen-events={IN_MOVED_TO,IN_CLOSE_WRITE}
    which inotify events to listen for. (default IN_MOVED_TO)

-e, --exclude=PATTERN
    exclude files matching this regular expression from upload. Cannot be used with --include If neither --exclude or --include are defined, all files matching -tmp are excluded

-i, --include=PATTERN
    opposite of --exclude

--max-upload-size=NUMBER
    max size in MB for files to be uploaded before switching to multipart mode. (default 5120)

--multipart-chunk-size=NUMBER
    chunk size in MB for multipart uploads (default 256)

ENVIRONMENT

AWS_ACCESS_KEY_ID
    Amazon access key to be used if --aws-key is not specified

AWS_SECRET_ACCESS_KEY
    Amazon secret key to be used if --aws-secret is not specified

AWS_SECURITY_TOKEN
    Amazon security token to be used if --aws-token is not specified

TABLESNAP_SYSLOG
    If set, all log messages will be sent to syslog under the DAEMON facility instead of stderr

TDEBUG
    If set, logs are emitted at the DEBUG level (default INFO)

DIAGNOSTICS
The following diagnostics may be issued on stderr:

Skipping filename due to exclusion rule
    The given file is not being uploaded because it matched the pattern given by --exclude
Failed uploading filename Aborting.
    An unhandled exception was caught when trying to upload a file. tablesnap(1) will terminate itself and all child threads after emitting this message.
Failed to lookup keyname name after number retries
    While trying to check whether or not the key has already been uploaded to S3 and MD5 is valid, the request failed and the maximum number of retries were exceeded.
Failed to open file: filename
    The file could not be opened when trying to verify it's MD5 checksum.
Failed to upload directory listing
    Uploading the -listdir.json file failed due to an uncaught exception and the maximum number of retries was exceeded.
Error uploading part number
    One of the uploads failed during a multipart upload. The multipart operation will be cancelled and retried from the beginning.
Failed to upload file contents
    The file upload failed and the max number of retries were exceeded.

BUGS
Please report all bugs to the maintainers at https://github.com/JeremyGrosser/tablesnap/issues

AUTHORS
Jeremy Grosser <jeremy@synack.me> Jorge A Gallegos <kad@blegh.net>

SEE ALSO
tablechop(1), tableslurp(1)