JeremyGrosser / tablesnap

Uses inotify to monitor Cassandra SSTables and upload them to S3
BSD 2-Clause "Simplified" License
181 stars 86 forks source link

#77: added init script for redhat os #78

Closed Mortinke closed 7 years ago

Mortinke commented 7 years ago

77 I added an init script for tablesnap with the options start, stop, status and restart.

Assumptions:

Here you can find an example of the configuration file

# security creds
export AWS_ACCESS_KEY_ID=***********
export AWS_SECRET_ACCESS_KEY=*****************

# aws region from s3 bucket
AWS_REGION=eu-central-1

# aws bucket name for backup
AWS_BACKUP_S3_BUCKET=<bucket_name>

AWS_KEYSPACES_BACKUP_LIST='/opt/data/system /opt/data/system_traces /opt/data/system_auth /opt/data/bar /opt/data/foo '

# to enable syslog
#export TABLESNAP_SYSLOG=TRUE

# to enable debug log
#export TDEBUG=TRUE

# parameters for init script /etc/init.d/tablesnap or /usr/local/sbin/tablesnap
TABLESNAP_PARAMETERS="-r -a -B --with-sse --aws-region ${AWS_REGION} ${AWS_BACKUP_S3_BUCKET} ${AWS_KEYSPACES_BACKUP_LIST}"
TABLESNAP_LOGDIR=/var/log/tablesnap/
JeremyGrosser commented 7 years ago

Is there any reason you can't just use the same init script we have in the debian branch? https://github.com/JeremyGrosser/tablesnap/blob/debian/debian/tablesnap.init

Mortinke commented 7 years ago

This script does not work with the systems CentOS and Amazon Linux which we currently used. There are commands and files which only exists/works with debian os e.g. /lib/lsb/init-functions and status_of_proc.