This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Database credentials | |
DB_USER="your_username" # change this | |
DB_PASSWORD="your_password" # change this | |
DB_NAME="your_database_name" # change this | |
# Backup directory | |
BACKUP_DIR="/path/to/backup/directory" # change this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from elasticsearch import Elasticsearch | |
import sys | |
ELASTIC_PASSWORD = sys.argv[1] | |
client = Elasticsearch( | |
"https://localhost:9200", | |
ca_certs="/etc/elasticsearch/certs/http_ca.crt", | |
basic_auth=("elastic", ELASTIC_PASSWORD) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from elasticsearch import Elasticsearch | |
from datetime import datetime | |
import sys | |
ELASTIC_PASSWORD = sys.argv[1] | |
client = Elasticsearch( | |
"https://localhost:9200", | |
ca_certs="/etc/elasticsearch/certs/http_ca.crt", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Use at your own risk and reward. | |
# requires boto3 to be installed | |
# example `./get-vars.py MyStack > vars.json` | |
import sys, json | |
import boto3 | |
import argparse |