Difference between revisions of "Main Page"

From Wiki at Neela Nurseries
Jump to: navigation, search
m (^ Shell scripting)
Line 53: Line 53:
  
 
DATABASE_LIST="information_schema mysql phpmyadmin wikidb database_1 database_2 database_3 ..."
 
DATABASE_LIST="information_schema mysql phpmyadmin wikidb database_1 database_2 database_3 ..."
 +
 +
SERVER_NAME="example_database_server"
  
 
user="root"
 
user="root"
 
pass_phrase_for_mysql="database-passphrase"
 
pass_phrase_for_mysql="database-passphrase"
 
options_extra="--skip-lock-tables"
 
options_extra="--skip-lock-tables"
 +
  
 
response="n"
 
response="n"
Line 69: Line 72:
  
 
for database in ${DATABASE_LIST};  
 
for database in ${DATABASE_LIST};  
do echo "backing up alta-ubuntu database $database . . .";
+
do echo "backing up $SERVER_NAME database $database . . .";
  
 
#    command="mysqldump --databases $database -u$user -p$pass_phrase_for_mysql $options_extra >> au-database-back-up--${database}.sql"
 
#    command="mysqldump --databases $database -u$user -p$pass_phrase_for_mysql $options_extra >> au-database-back-up--${database}.sql"

Revision as of 19:59, 11 October 2017

MediaWiki installation at Neela Nurseries, 2017 June

Consult the User's Guide for information on using the wiki software.

Getting started - this is MediaWiki's default main page section



^ Linux Distributions for Download



^ Linux Administration



^ Shell scripting


A well-written and comprehensive guide to bash shell scripting:


Simple bash script to back up MYSQL databases to local .sql file, in following figure. Ted noting that script variables are not consistently capitalized, would be better form to capitalize all or none of them. Ted also noting that script could read database user passphrase from a file, a file which could be root-only readable and located in a place different from the script, which is likely to be run as a cron job.


Figure x - shell script to dump MYSQL databases, first draft script:


#!/bin/bash


DATABASE_LIST="information_schema mysql phpmyadmin wikidb database_1 database_2 database_3 ..."

SERVER_NAME="example_database_server"

user="root"
pass_phrase_for_mysql="database-passphrase"
options_extra="--skip-lock-tables"


response="n"

mode_interactive="n"



echo "shell script starting,"



for database in ${DATABASE_LIST}; 
do echo "backing up $SERVER_NAME database $database . . .";

#    command="mysqldump --databases $database -u$user -p$pass_phrase_for_mysql $options_extra >> au-database-back-up--${database}.sql"
    command="mysqldump --databases $database -u$user -p$pass_phrase_for_mysql $options_extra"
    redirect="au-database-back-up--${database}.sql"

    if [ $mode_interactive = 'y' ]; then

        echo "build command '$command' and database back-up filename'$redirect',"
        echo "full command will be '$command' > '$redirect',"
        echo "trying running this command and redirect? [y/N/q]  yes, no, 'q' to quit"

        read response
        if [ $response = 'Y' -o $response = 'y' ]; then
            ${command} > $redirect
        elif [ $response = 'N' -o $response = 'n' ]; then
            echo "skipping present command . . ."
        elif [ $response = 'Q' -o $response = 'q' ]; then
            echo "stopping script '$0' and exiting."
            break
        fi
        echo

    else

        echo "$0:  backing up database '$database' to file '$redirect' . . ."
        ${command} > $redirect
        ls -l $redirect

    fi

done


echo "done."

exit 0



^ How To Use Git


Wanting to understand and use git better, here are some on-line references to git version control. Also, Ted searching for a git reference posted by a female author, can't remember name but reference well-written with lots of commands and concise explanations of each command. First URL reference may be that page, now 2017-10-02 not sure of the author's name . . .


Basic git commands:


Git references found while answering specific git task questions:



^ Drupal Content Management




2017-08-23


2017-08-23 - Drupal installation . . .


2017-08-24

2017-08-25

2017-08-30
Ted looking for information on how Drupal can aid setting up dynamic, site navigation menus:


2017-09-01



^ Composer, a dependency manager of PHP



^ Geography and Science



^ Music and Culture



^ Outdoors




- - - top of page - - -