File: README

package info (click to toggle)
mylvmbackup 0.13-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 244 kB
  • sloc: perl: 1,465; sh: 149; makefile: 126
file content (58 lines) | stat: -rw-r--r-- 3,234 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
mylvmbackup - utility for creating MySQL backups via LVM snapshots

Home page: http://www.lenzg.net/mylvmbackup/
Source code, Bug Reports: https://launchpad.net/mylvmbackup
Maintainer: Lenz Grimmer <lenz@grimmer.com>

mylvmbackup is a Perl script for quickly creating backups of MySQL server's
data files. To perform a backup, mylvmbackup obtains a read lock on all tables
and flushes all server caches to disk, makes an LVM snapshot of the volume
containing the MySQL data directory, and unlocks the tables again. The snapshot
process takes only a small amount of time. When it is done, the server can
continue normal operations, while the actual file backup proceeds.

The LVM snapshot is mounted to a temporary directory and all data is backed
up using the tar program. By default, the archive file is created using a name
of the form backup-YYYYMMDD_hhmmss_mysql.tar.gz, where YYYY, MM, DD, hh, mm,
and ss represent the year, month, day, hour, minute, and second of the time at
which the backup occurred. The prefix backup and the date format can be
modified. The use of timestamped archive names allows you to run mylvmbackup
many times without danger of overwriting old archives.

It is necessary to run mylvmbackup on the same host where the MySQL server
runs. If your MySQL daemon is not listening on localhost, or using the default
socket location, you must specify --host or --socket. Even though mylvmbackup
communicates with the server through a normal client connection to obtain the
read lock and flush data, it makes the backup by accessing the file system
directly. It is also necessary that the MySQL server data directory resides on
an LVM volume. (It is, however, a good idea to do the LVM backup to a different
partition than the one where the data directory resides. Otherwise, there is a
good chance that LVM will run out of undo space for LVM snapshot maintenance
and the backup will fail.)

The user who invokes mylvmbackup must have sufficient filesystem permissions to
create the LVM snapshot and mount it. This includes read/write access to the
backup directory.

Requirements

For proper operation mylvmbackup requires Perl 5 with the 'DBI' and
'DBD::mysql' modules. It also needs the 'Config::IniFiles' to read the global
configuration file of the program and 'Sys::Syslog' in case you want to enable
the syslog log facility. 'Date::Format' is required to create the time stamp
used in the backup file names. In addition, it utilizes 'Getopt::Long' and
'File::Basename' which usually are part of the default Perl distribution.

It also requires several other external programs: GNU 'tar' and 'gzip' to back
up and compress the data, LVM utilities ('lvcreate', 'lvremove' and 'lvs') to
create and remove the LVM snapshot, and the system utilities 'mount' and
'umount'.

Mailing list

If you want to discuss the usage of mylvmbackup, propose patches or ask for
help, there now is a mailinglist, hosted on FreeLists.org. To
subscribe, either enter your email address on the mylvmbackup list
information page at http://www.freelists.org/list/mylvmbackup or send an
email with the subject "subscribe" to mylvmbackup-request@freelists.org.
The list is archived at http://www.freelists.org/archives/mylvmbackup/