Mylvmbackup: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
K (x) |
K (x) |
||
Zeile 16: | Zeile 16: | ||
[fs] | [fs] | ||
backupdir=/srv/mysql/backup</source> | backupdir=/srv/mysql/backup | ||
[tools] | |||
lvcreate=/sbin/lvcreate | |||
lvremove=/sbin/lvremove | |||
lvs=/sbin/lvs | |||
mount=/bin/mount | |||
tar=/bin/tar | |||
compress=/bin/gzip | |||
rsync=/usr/bin/rsync | |||
umount=/bin/umount | |||
</source> | |||
<br> | <br> |
Aktuelle Version vom 3. Oktober 2012, 17:11 Uhr
This script performs a MySQL backup by using an LVM snapshot volume.
It requires the MySQL server's data directory to be placed on a logical volume, and creates an LVM snapshot to create a copy of the MySQL datadir.
Afterwards, all data files are archived to a backup directory.
See the manual page for more info including a complete list of options and check the home page at http://www.lenzg.net/mylvmbackup for more info.
#/etc/mylvmbackup.conf
[mysql]
socket=/var/run/mysqld/mysqld.sock
[lvm]
vgname=vg0
lvname=mysql
[fs]
backupdir=/srv/mysql/backup
[tools]
lvcreate=/sbin/lvcreate
lvremove=/sbin/lvremove
lvs=/sbin/lvs
mount=/bin/mount
tar=/bin/tar
compress=/bin/gzip
rsync=/usr/bin/rsync
umount=/bin/umount
#
# Regular cron jobs for the mylvmbackup package
#
# Every night at 5 o'clock.
0 5 * * * root test -x /usr/bin/mylvmbackup && /usr/bin/mylvmbackup --quiet