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
# -*- encoding: utf-8 -*- | |
# requires a recent enough python with idna support in socket | |
# pyopenssl, cryptography and idna | |
from OpenSSL import SSL | |
from cryptography import x509 | |
from cryptography.x509.oid import NameOID | |
import idna | |
from socket import socket |
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
""" | |
This python script encodes all files in specified working directory. | |
Sources: http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide | |
command: python video-encode.py /dir/to/encode | |
output: /dir/to/encode/encoded | |
""" |
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 | |
# OPLOG_LIMIT: only include oplog entries before the provided Timestamp | |
# The timestamp is a unix timestamp | |
# If your desaster happened for example on 2017-18-10 12:20 and you want to restore until 12:19 | |
# your timestamp is 'date -d "2017-10-18 12:19:00" +%s' | |
FULL_DUMP_DIRECTORY=$1 | |
OPLOGS_DIRECTORY=$2 | |
OPLOG_LIMIT=$3 |
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 | |
function initStaticParams | |
{ | |
MONGODB_SERVER=127.0.0.1 | |
MONOGDB_PORT=27017 | |
MONGODB_USER= | |
MONGODB_PWD= | |
OUTPUT_DIRECTORY=/mnt/backups/oplogs | |
LOG_FILE="/appl/mongo-backup/logs/backup.log" |