Skip to content

backup

rsync

#rsync de synchronisation de repertoire avec copie des modifs rsync -rtlvz  –delete /mnt/reseau/ /backup/

Backup d’une database MySQL

mysqldump -h localhost -u user -ppassword -r/tmp/mysql_backup.data nomdatabase mysql -h localhost -u user -ppassword nomdatabase < /tmp/mysql_backup.data

mysql_backup.sh

#!/bin/bash prefixe=backup suffixe=$(date +%Y%m%d) filename=$prefixe$suffixe.sql host=host database=database user=user characterSet=UTF8 mysqldump –skip-comments \ –complete-insert \ –default-character-set=$characterSet \ –no-create-info \ –skip-add-locks \ –skip-opt \ –host $host \… Read More »mysql_backup.sh