Diagrama del patrón de diseño Modelo Vista Controlador (MVC)
30 de junio de 2020Plugins para WordPress & quitar underline en hiperenlaces
1 de julio de 2020MYSQL BACKUP
Remote Host Backup with linked PATH to mysqldump:
0 1 * * * mysqldump -h mysql.host.com -uusername -ppassword --opt database > /path/to/directory/filename.sql
Remote Host Backup:
0 1 * * * /usr/local/mysql/bin/mysqldump -h mysql.host.com -uusername -ppassword --opt database > /path/to/directory/filename.sql
Local Host mysql Backup:
0 1 * * * /usr/local/mysql/bin/mysqldump -uroot -ppassword --opt database > /path/to/directory/filename.sql
Local Host mysql Backup zipped and rotated each 7 days:
#!/bin/sh
mysqldump -h localhost -uroot --lock-tables=false --all-databases | gzip -9 -c > /media/bkfolder/backup_`date +"%Y-%m-%d"`.gz
find /media/bkfolder/ -mtime +7 -name'*.gz' -exec rm {} \;
Create a file named mysql-backup in /etc/cron.daily and chmod it with 755.