Creare MySQL Backup cu AutoMySQLBackup

0

1. instalam AutoMySQLBackup


Deschidem fisierul /etc/default/automysqlbackup cu nano, vi, pico eu o sa folosesc nano

[…]
# Host name (or IP address) of MySQL server e.g localhost
DBHOST=localhost
[…]
# List of DBNAMES for Daily/Weekly Backup e.g. “DB1 DB2 DB3″
# The following is a quick hack that will find the names of the databases by
# reading the mysql folder content. Feel free to replace by something else.
#DBNAMES=”db_ispconfig web1 web2 web3″
DBNAMES=find /var/lib/mysql -mindepth 1 -maxdepth 1 -type d | cut -d’/’ -f5 | grep -v ^mysql\$ | tr \\\r\\\n ,\
[…]
# Backup directory location e.g /backups
# Folders inside this one will be created (daily, weekly, etc.), and the
# subfolders will be database names.
BACKUPDIR=”/var/lib/automysqlbackup”
[…]
# Email Address to send mail to? (user@domain.com)
MAILADDR=”backup@xploit.ro
[…]

2. Pornim automysqlbackup


In directorul /var/lib/automysqlbackup ne arata urmatoarele date

[root@xploit ~]# ls -l /var/lib/automysqlbackup
total 12
drwxr-xr-x 4 root root 4096 2015-04-08 19:40 daily
drwxr-xr-x 2 root root 4096 2015-04-08 19:40 monthly
drwxr-xr-x 4 root root 4096 2015-04-08 19:40 weekly
[root@xploit ~]#

Good luck !

Leave A Reply