Mylvmbackup: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
K (init) |
K (x) |
||
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
This script performs a MySQL backup by using an LVM snapshot volume.<br>It requires the MySQL server's data directory to be placed on a logical | This script performs a MySQL backup by using an LVM snapshot volume.<br>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.<br>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.<br> | |||
<br> | |||
<source lang="bash">#/etc/mylvmbackup.conf | <source lang="bash">#/etc/mylvmbackup.conf | ||
Zeile 16: | Zeile 16: | ||
[fs] | [fs] | ||
backupdir=/srv/mysql/backup | 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> | |||
<source lang="bash"># | <source lang="bash"># | ||
Zeile 24: | Zeile 37: | ||
# | # | ||
# Every night at 5 o'clock. | # Every night at 5 o'clock. | ||
0 5 * * * root test -x /usr/bin/mylvmbackup && /usr/bin/mylvmbackup --quiet</source> | 0 5 * * * root test -x /usr/bin/mylvmbackup && /usr/bin/mylvmbackup --quiet</source> | ||
[[ | [[Category:Datenbank]] [[Category:MySQL]] [[Category:Linux]] [[Category:Backup]] [[Category:Ubuntu]] | ||
[[ | |||
[[ | |||
[[ | |||
[[ |
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