Quantcast
Channel: Tuxevaras Blog » Backup
Viewing all articles
Browse latest Browse all 3

MySQL Backups Made Easy

$
0
0

Using logrotate makes it very easy to create MySQL dumps regularly. Just create a file at /etc/logrotate.d/ with the following content:

/var/backups/mysql/dump.sql {
daily
rotate 14
missingok
compress
postrotate
/usr/bin/mysqldump -u -p --opt \
--flush-logs --all-databases > /var/backups/mysql/dump.sql
endscript
}

You may have to create the directory /var/backups/mysql/ manually.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images