Friday, November 21. 2014
I'm happy to announce the release of mylvmbackup version 0.16. The source package is now available for download from http://lenzg.net/mylvmbackup/ and https://launchpad.net/mylvmbackup.
Installation packages for a number of platforms can be obtained from the openSUSE Build Service.
Version 0.16 adds support for sending out SNMP traps in case of backup successes or failures. I'd like to thank Alexandre Anriot for contributing this new feature and his patience with me.
Please see the ChangeLog and bzr history for more details.
Sunday, February 23. 2014
I'm happy to announce the release of mylvmbackup version 0.15. It is now available for download from http://lenzg.net/mylvmbackup/ and https://launchpad.net/mylvmbackup
Probably the biggest highlight of 0.15 is the addition of zbackup as an additional backup type. I'd like to thank Ivan Korjavin for contributing this new feature.
Additionally, this release provides several improvements and bug fixes. For example, it's now possible to back up more than a single my.cnf configuration file by providing a directory name like /etc/mysql instead.
Please see the ChangeLog and bzr history for more details.
Thursday, January 5. 2012
Reposting of what I wrote on the Oracle Linux Blog:
Just a friendly reminder: this year too, we'll continue this series of free one-day events.
OTN Sys Admin Days are like OTN's Developer Days, but we focus on the Sys Admin with two parallel, hands-on Oracle Solaris and Oracle Linux tracks. These are live classroom events and you'll need to bring your own laptop to follow the practical exercises that we will go through in a VirtualBox environment.
The Linux track will cover topics like package management with RPM and yum, storage management with LVM2 and Linux RAID as well as learning the basics of managing the Btrfs file system. The Solaris track will cover the ZFS file system, Solaris containers and security (roles, SMF).
The next OTN Sys Admin Day will take place in Salt Lake City (UT), on January 18th, 8:00am-4:00pm.
Attendance is free, but a registration is required – reserve your spot now by following this link! We look forward to your participation.
Wednesday, September 14. 2011
Last week we concluded our first Oracle Technology Network Sys Admin Day in Sacramento (CA). Well, it was actually the second Sys Admin Day, but the first one that had two parallel tracks of sessions about both Oracle Linux and Oracle Solaris.
I helped preparing for the event by creating the Linux lab handbook as well as the VirtualBox appliance of Oracle Linux 6.1 that was used for the exercises. Unfortunately I could not be there in person, but it would have been pointless for me to go on an intercontinental flight just for one day.
From the feedback we've received so far, the attendees really enjoyed the event and were positively surprised about the depth and quality of the practical hands-on lab sessions.
If you've missed the first one and happen to live somewhere in the Seattle area, you have another chance to attend OTN sysadmin day: we'll be hosting another one on Thursday, September 22nd at The Westin Seattle (1900 5th Ave., Seattle, WA 98101). Again, attendance is free, all you need to bring is your own laptop with VirtualBox installed. We'll provide the rest. Space is limited — you can review the agenda and register here!
Sunday, September 6. 2009
I am happy to announce that mylvmbackup version 0.13 has now been released. This release includes a fix for a nasty bug in on of the recently added Perl hooks (precleanup.pm) and some added functionality (better support for remote rsync backups).
From the ChangeLog:
- Deleted sample precleanup.pm hook as it has potential to cause harm and is too specialized on a particular use case (BUG#394668)
- Added support for rsync via SSH (BUG#392462)
- Fixed InnoDB recovery in case a relative path to the MySQL data directory is defined (BUG#38337), improved the documentation of relpath in the man page.
Saturday, June 20. 2009
After a long hiatus, I am happy to announce that mylvmbackup version 0.12 has now been released. This release includes a large number of improvements, minor code cleanups, as well as some new functionality. In particular, I would like to thank Matthew Boehm, Tim Stoop, Baron Schwartz, Ville Skyttä and Ronald Bradford for their contributions.
Some notable highlights from the ChangeLog:
- Removed the absolute path names to external tools (make sure $PATH is correct)
- Added --log-err to the startup options of the recovery instance to avoid cluttering the server's error log
- Added support for hooks written as Perl Modules. (Matthew Boehm)
- Added support for date/time-formatted path names for backupdir and mountdir (Matthew Boehm)
- Backupdir and mountdir are now created automatically (Matthew Boehm)
- Added new hook "logerr" when an error is logged. (Matthew Boehm)
- Added Option --keep-mount... (Tim Stoop)
- Removed the bind mount, now requires LVMv2
- Support reading login/password from ~/.my.cnf (Baron Schwartz)
- Documentation fixes and improvements (Ville Skyttä) (Bug #302144)
Tuesday, February 24. 2009
My calendar for the upcoming months is already filling up with conferences, trade fairs and other events at which I'll speak about MySQL. Here's a quick overview:
- This coming Thursday at 15:00 CET, I'll be speaking about "Backing up MySQL using file system snapshots" at the MySQL University. The session will be hosted live using DimDim, which is a great online conferencing and presentation system (Flash required). Attendance is free, so come and join me if you want to learn more about this backup technique!
- On Friday, 6th of March at 15:15 I'll give a presentation about "MySQL Backup and Security" in the CeBit Open Source Forum in Hannover, Germany. By the way, Sun will have a large presence themed "Open Source for Open Minds" in Hall 6, Booth E36. There'll be a MySQL info pod as well, which I will help manning from Friday until Sunday, 8th. So make sure to stop by and say hello!
- On March 23-24, there'll be a PHP/MySQL Conference in Warsaw, Poland, organized by IDG. I submitted three talks about various MySQL topics, currently I am still waiting for the confirmation which of these they selected.
- On April 20-23, there is of course the MySQL Conference & Expo in Santa Clara, to which I am very much looking forward to. I'm helping to organize the DotOrg Pavilion in the exhibition hall and will likely give a BoF about a project I'm currently involved in.
- In May 4-5 there is the AMOOCON in Rostock, Germany, which is a conference about Open Source VoIP and communication. I'll talk about "MySQL High Availability Solutions" and "Backup & Security Best Practices" (in German). My colleague Geert will be there as well, giving an in-depth talk about MySQL Cluster.
There is a number of additional events in the pipeline, I'll blog about these once my session proposals have been accepted.
Monday, December 1. 2008
Some days ago, I released version 0.11 of mylvmbackup a Perl script that performs consistent backups of a MySQL server by using LVM filesystem snapshots. The source archive as well as a generic RPM can be found on the project home page, packages for many Linux distributions are available on the openSUSE Build service.
This release includes some new functionality as well as numerous bug fixes and improvements, most notably:
- Added support for using rsnap as a backup backend (Matt Lohier)
- The documentation is now maintained in POD style instead of asciidoc (Matthew Boehm)
- Support using non-GNU tar and additional compression methods (e.g. bzip2, lzma) (Alexander Skwar)
- Code cleanups, improved error handling and logging
I would like to thank all the contributors for their support! More details about the changes in this release, directly from the ChangeLog:
- Added new option "--quiet" that suppresses informal logging output (warnings and errors will still be printed/logged)
- Applied patch from "kjetilho" that makes mylvmbackup more robust and paranoid when it comes to handling errors/failures (Bug #298175) Now the script aborts cleanly in case of any error.
- Fixed error handling in case of a failed DB connection (patch submitted by Matthew Boehm, Bug #280989)
- Merged changes from Alexander Skwar: Fix for Bug #278478 and implemented Blueprint "Improve the tar backup backend of mylvmbackup"
- Fixed Bug #271671: "overloading parameters does not work" by removing the default values for host and port from the configuration file and removing the unnecessary check for passing both host and socket at the same time. Updated documentation and configuration file comments accordingly.
- Applied patch suggested by "Jonas" to fix Bug #267944: "backup returns successfully when snapshot creation fails"
- Code cleanup: moved flushing of tables in a separate subroutine flush_tables()
- Code cleanup: moved log messages into the respective subroutines
- Code cleanup: use return values of subroutines instead of updating global variables
- Improved some log messages to explain what was DONE or FAILED
- Code cleanup: build up long command strings in a $command variable before passing it to system()
- Renamed subroutine create_snapshot() to create_lvm_snapshot()
- Merged patch from Matthew Boehm: Removed old asciidoc documentation in favor of POD style. This removes the dependency on the external program a2x for creating documentation and uses the 'built-in' pod2html and pod2man instead. Updated the Makefile to accommodate the change.
- Applied patch from Matthew Boehm to make the backup file name suffix configurable via a "--suffix" option. Updated the man page accordingly.
- Applied patch from Matt Lohier to support rsnap as a backup backend
- Moved the list of contributors from the man page into a separate CREDITS file, added missing names
Enjoy!
Saturday, September 20. 2008
I am happy to announce that mylvmbackup version 0.10 has been released.
You can download the updated package from the project home page or via the openSUSE Build Service.
This version fixes some bugs and includes new functionality:
- Applied patch from Marc Haber: added option --keep_snapshot that will skip the removal of the backup snapshot before terminating the script. Providing the option --backuptype=none will now skip creating a backup using the builtin backup modules. Both options provide more flexibility when using hooks for performing the actual backup tasks or when the snapshot is considered to be the actual backup.
- Added two new hooks: "backupsuccess" and "backupfailure" which are called respectively upon success of failure of the backup operation (Bug #264089)
- Make sure that binaries are being found ($PATH may not include /sbin when called from cron), added missing entry for "lvs" to mylvmbackup.conf (Bug #255703)
- Updated documentation
Friday, July 11. 2008
I am happy to announce that a new version (0.9) of mylvmbackup has been released. This is the first release since the source code has been moved from Subversion to Bazaar and is now hosted on Launchpad.net. I would like to thank Robin H. Johnson and Patrick Hahn for providing the patches that contributed to this new release!
mylvmbackup is a tool 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.
From the ChangeLog:
- Applied patch from Patrick Hahn: provide an option to call external scripts/applications (hooks) at various stages of the backup process. See the man page for instructions
- Added options "--skip_hooks" to disable the execution of hooks and "--hooksdir" to define the location for these (default is /usr/share/mylvmbackup)
- Updated documentation: added new options and instructions on how to use hooks
- Applied patch from Robin H. Johnson: Full support for an rsync:// service as the backup destination. If you include any path fragments with the rsync module name, they must already exist!
- Updated documentation to reflect these changes
- Updated TODO
You can download a source tarball or RPM from the project home page. Additional packages for various Linux distributions can be obtained from the openSUSE Build Service. Packages for Gentoo and Debian should appear shortly, too.
Enjoy! Please let me know how mylvmbackup works for you, either by posting to our mailing list or by submitting a bug report. Thanks!
Wednesday, June 25. 2008
JFYI: today I migrated the mylvmbackup source tree from my local Subversion repository on http://www.lenzg.net/ to a Bazaar repository on Launchpad.net.
This will hopefully make it easier for contributors to work on the code and share their modifications with others, removing me as the bottleneck for applying and testing patches for new releases. I chose Bazaar primarily because I wanted to get some more hands-on practice with it, now that the MySQL Server source trees have been transferred to it as well (see Kaj's announcement for details).
As mylvmbackup is closely related to the MySQL Server project, it made sense to choose the same platform and enjoy the cross-pollination effects and the infrastructure that Launchpad provides. Additionally, the distributed nature of Bazaar makes it more convenient to work with the code history and commiting changes locally without having to be online and connected to the SVN server.
I am sure that other DSCMSs like Git, Mercurial or darcs would have done the job equally well - nowadays it's very hard to choose 
The "trunk" branch is now hosted on Launchpad. I assume that I will soon open up a development branch, that will receive heavier modifications first. I also plan to use the site for bug tracking and keeping track of feature requests (via Blueprints).
To create a local branch of the "trunk" repository, you can use the following command:
bzr branch lp:mylvmbackup
I also maintain a copy of that branch on my home server, just in case: http://www.lenzg.net/bzr/mylvmbackup/
To avoid confusion, I removed the Subversion repository on http://www.lenzg.net. Please use the Bazaar tree on Launchpad from now on. Thanks!
Thursday, April 24. 2008
JFYI, I now placed a PDF of my MySQL Conference talk slides about "Performing MySQL backups using Linux LVM Snapshots" on my MySQL talks page. Enjoy!
Wednesday, April 16. 2008
While reading Colin's post about LugRadio Live, I stumbled over the Zumastor Linux Storage Project. Going through the project home page and their HOWTO got me curious - could this eventually become an alternative to using DRBD (for replicating data) and LVM snapshots (for performing backups)?
Zumastor is Free software that adds enterprise storage features (primarily improved snapshots and remote replication) to Linux.
Snapshots
LVM already lets administrators create snapshots, but its design has the surprising property that every block you change on the original volume consumes one block for each snapshot. The resulting speed and space penalty usually makes the use of more than one or two snapshots at a time impractical.
Zumastor keeps all snapshots for a particular volume in a common snapshot store, and shares blocks the way one would expect. Thus making a change to one block of a file in the original volume only uses one block in the snapshot store no matter how many snapshots you have.
Replication
Andrew Tridgell's rsync is a wonderful tool for replicating files remotely. However, when doing periodic replication of large numbers of infrequently changing files, the overhead for figuring out what files need to be sent can be extreme.
Zumastor keeps track of which block change between one snapshot and the next, and can easily send just the changed blocks. Thus Zumastor can do frequent replication of large filesystems much more efficiently than rsync can.
I assume it's not ready for production use yet, but it would sure be interesting to investigate on how to utilize it for the purpose of running MySQL on top of it...
I will keep an eye on this project, I wonder if I will have to add support for Zumastor snapshots to mylvmbackup at some point? 
Friday, April 11. 2008
I am happy to announce the release of mylvmbackup version 0.8. mylvmbackup is a tool 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.
Below is the list of changes since version 0.6. You may wonder what happened to version 0.7 - it had a rather short life cycle as I was informed about a bug that I fixed quickly before I made a wider release announcement of 0.7.
- Fixed a bug in the InnoDB recovery function: the second mysqld process clobbered the socket file of the primary MySQL instance (thanks to Alain Hoang for reporting this)
- Updated the man page, noted some other limitations of the InnoDB recovery function
- Bug fix: use the correct mysqld parameter to provide an alternative PID file (--pid-file instead of --pidfile) - thanks to Guillaume Boddaert and Jim Wilson for reporting this!
- Added option "--skip_mycnf" to skip including a copy of the MySQL configuration file in the backup, added a safety check that the file actually exists prior to backing it up.
Updated package are available from the home page and via the openSUSE Build Service as usual. Updated packages for Debian/Ubuntu and Gentoo Linux should also be available shortly. Enjoy!
Speaking of LVM snapshot backups: I will be giving a talk about this subject at our MySQL Conference 2008 in Santa Clara, CA next week. If you are curious about how MySQL can be backed up using this technology, please consider to stop by!
Wednesday, February 20. 2008
I recently received a review copy of the book "Xen Virtualization" by Prabhakar Chaganti (Packt Publishing) and finished reading it a few days ago.
The subtitle "A fast and practical guide" is a matching description - I managed to read the ~130 pages over the course of a week. The book is by no means an exhaustive reference manual, but it gives the reader a good overview about Xen and assists with performing the first steps and getting started.
Continue reading "Book review: "Xen Virtualization" by Prabhakar Chaganti (Packt Publishing)"
|