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/sh | |
| ### (v2) | |
| ## backup each mysql db into a different file, rather than one big file | |
| ## as with --all-databases. This will make restores easier. | |
| ## To backup a single database simply add the db name as a parameter (or multiple dbs) | |
| ## IGNORE THIS BLOCK TO >=(v2) | |
| ## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is | |
| ## Create the user and directories | |
| # mkdir -p /var/backups/mysql/databases |
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
| #Get the final date not including holydates, having the numbers days that want calculate and the date inicial | |
| #Try in http://rextester.com/live/QACMX44672 | |
| # EN este ejemplo se prueba con un numero de dias de 30 y con la fecha inicial la de hoy. | |
| # Se debe tener la tabla con cada fecha festiva despues de el dia de fecha inicia, incluyendo domingos tal como la tabla que se crea, | |
| # este ejemplo se probo el dia 19 de octubre de 2017 | |
| CREATE TABLE IF NOT EXISTS `festivos` ( | |
| `dia` date NOT NULL | |
| ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci; |
NewerOlder