- pgx_list_dbs: Lists the names of databases in an .sql file dumped using pg_dumpall.
- pgx_extract_db: Extracts a single database from a sql file dumped with pg_dumpall and outputs its content to stdout.
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 | |
| ## | |
| # Quick and dirty website monitor | |
| # | |
| # add to cron: | |
| # */5 * * * * $HOME/webmon.sh >> $HOME/logs/user/cron.log 2>&1 | |
| ## | |
| if curl -s http://website.org | grep -q "Page title"; |
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 | |
| # | |
| # Use this script to perform backups of one or more MySQL databases. | |
| # | |
| # Databases that you wish to be backed up by this script. You can have any number of databases specified; encapsilate each database name in single quotes and separate each database name by a space. | |
| # | |
| # Example: | |
| # databases=( '__DATABASE_1__' '__DATABASE_2__' ) |
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 | |
| # Destiny folder where backups are stored | |
| DEST=/tmp/bacula/server01 | |
| CURRDATE=$(date +"%F") | |
| # Hostname where MySQL is running | |
| HOSTNAME="srv-mysql" | |
| # User name to make backup | |
| USER="root" |
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 -e | |
| clear | |
| echo "============================================" | |
| echo "Instalador de Wordpress" | |
| echo "============================================" | |
| echo "Host do Banco de dados: " | |
| read -e dbhost | |
| echo "Nome do Banco de dados: " | |
| read -e dbname | |
| echo "Usúario do Banco de dados: " |
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 | |
| # The script will fail at the first error encountered | |
| set -e | |
| PASS=`pwgen -s 40 1` | |
| mysql -uroot <<MYSQL_SCRIPT | |
| CREATE DATABASE $1; | |
| CREATE USER '$1'@'localhost' IDENTIFIED BY '$PASS'; | |
| GRANT ALL PRIVILEGES ON $1.* TO '$1'@'localhost'; |
NewerOlder