Creating the NFS Volume:
$ docker volume create --driver local \
--opt type=nfs \
--opt o=addr=192.168.1.115,uid=1000,gid=1000,rw \
--opt device=:/mnt/volumes/mysql-test \
mysql-test-1
#1. Backup and Restore Single Database | |
#Backup: single database in PostgreSQL. Replace your actual database name with mydb. | |
pg_dump -U postgres -d mydb > mydb.pgsql | |
#Restore: single database backup in PostgreSQL. | |
psql -U postgres -d mydb < mydb.pgsql | |
#2. Backup and Restore All Databases | |
#Backup: all databases in PostgreSQL using pg_dumpall utility. |
# Stop dance for OpenResty | |
# A modification of the Nginx systemd script | |
# Source: https://www.digitalocean.com/community/tutorials/how-to-use-the-openresty-web-framework-for-nginx-on-ubuntu-16-04 | |
# ======================= | |
# | |
# ExecStop sends SIGSTOP (graceful stop) to the Nginx process. | |
# If, after 5s (--retry QUIT/5) OpenResty is still running, systemd takes control | |
# and sends SIGTERM (fast shutdown) to the main process. | |
# After another 5s (TimeoutStopSec=5), and if OpenResty is alive, systemd sends | |
# SIGKILL to all the remaining processes in the process group (KillMode=mixed). |
package main | |
import ( | |
"encoding/json" | |
"flag" | |
"io/ioutil" | |
"log" | |
"net" | |
"os" | |
"os/signal" |
http { | |
# other stuff here | |
# The upstream backend server this can be named whatever you desire | |
# See http://nginx.org/en/docs/http/ngx_http_upstream_module.html | |
upstream backend { | |
# this is the actual hostname + port of the backend server | |
server backend:8080; | |
# how many keep alive connections to allow, only set this if you're going | |
# to specify the `Connection` header in the proxy below, nginx sets the |
# m5.2xlarge 32.0 GiB 8 vCPUs | |
# s=100, n=10 | |
*** Only SELECTs, -T 30 -j4 -c12 | |
transaction type: <builtin: select only> | |
scaling factor: 100 | |
query mode: prepared | |
number of clients: 12 | |
number of threads: 4 | |
duration: 30 s |
<?php | |
$db_username = ''; //username | |
$db_password = ''; //password | |
//path to database file | |
$database_path = $_SERVER["DOCUMENT_ROOT"] . "\access\accessdatabase.accdb"; | |
//check file exist before we proceed | |
if (!file_exists($database_path)) { | |
die("Access database file not found !"); | |
} |
#!/bin/bash | |
dir=$(pwd) | |
(cd $1 | |
mkdir -p output | |
for i in * | |
do | |
output="output/$(echo $i | sed 's/\..*$/\.mp4/')" |
#!/bin/bash | |
# | |
# Usage: | |
# ./make_certs.sh test.example.com | |
# | |
# The required input to make_certs.sh is the path to your pfx file without the .pfx prefix | |
# | |
# test.example.com.key | |
# test.example.com.crt (includes ca-certs) |