mylvmbackup

mylvmbackup is a Perl script for quickly creating backups of a 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 actual backup can be performed by using tar, rsync, or rsnap.

Tags Utilities Archiving backup Database
Licenses GPL
Operating Systems POSIX Linux
Implementation Perl

Tweet this project Short link

Rss Recent releases

  • Rrelease-mid
  •  20 Jun 2009 13:53
  • Rrelease-after

    Changes: This release added support for hooks written as Perl modules, support for date/time-formatted path names for backupdir and mountdir, and a --keep-mount option. The bind mount was removed and now requires LVMv2. Backupdir and mountdir are now created automatically. A new "logerr" hook is called when an error is logged. Support for reading login and password from ~/.my.cnf was added.

    • Rrelease-mid
    •  24 Nov 2008 07:05
    • Rrelease-after

    Changes: The --quiet option was added. Error handling was made more robust and consistent. Support was added for non-GNU tar implementations. Support for rsnap backups was added. Code cleanups were done. The backup file name suffix is now configurable.

    • Rrelease-mid
    •  10 Jul 2008 17:19
    • Rrelease-after

    Changes: This release adds support for an rsync:// service as the backup destination. It adds support for calling external script hooks. The documentation has been updated.

    • Rrelease-mid
    •  11 Apr 2008 14:37
    • Rrelease-after

    Changes: A bug in the InnoDB recovery function has been fixed: the second mysqld process clobbered the socket file of the primary MySQL instance. This release uses the correct mysqld parameter to provide an alternative PID file (--pid-file instead of --pidfile). An option "--skip_mycnf" has been added to skip including a copy of the MySQL configuration file in the backup. A safety check that the file actually exists prior to backing it up has been added.

    • Rrelease-mid
    •  28 Oct 2007 06:06
    • Rrelease-after

    Changes: A new rsync backup type was added. Support for a trailing argument was added to tar. The suffix of the tarball was separated out. A temporary suffix is used at the end of the backup file name while the backup is performed. The my.cnf configuration file is now included in the backup. The ability to run an extra FLUSH TABLES on busy databases was added. The "--pidfile" option was added to provide an alternative PID file location. The output of "lvs <snapshot>" is now printed out for diagnostics. The "--skip-flush-tables" option was added.

    No-screenshot

    Project Spotlight

    XMLBeans

    Java to XML / XMLSchema data binding.

    No-screenshot

    Project Spotlight

    Rhope

    A dataflow programming language with transactions.