18 - Maintenance
Sauvegarde
mysqldump -u root -p educapro > backup_$(date +%Y%m%d).sqltar -czf images_$(date +%Y%m%d).tar.gz public/images/exercicesScript automatique
#!/bin/bash
BACKUP_DIR="/var/backups/educapro"
mkdir -p $BACKUP_DIR
mysqldump -u root -p educapro | gzip > $BACKUP_DIR/db_$(date +%Y%m%d).sql.gz
find $BACKUP_DIR -mtime +7 -delete0 2 * * * /usr/local/bin/backup-educapro.shMonitoring
tail -f storage/logs/laravel.log
tail -f /var/log/apache2/error.logSELECT table_name, ROUND((data_length + index_length) / 1024 / 1024, 2) AS 'Size (MB)'
FROM information_schema.TABLES
WHERE table_schema = 'educapro';Last updated