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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518
|
2014-02-22 Lenz Grimmer <lenz@grimmer.com>
- BUG#1283094: The Option "--recoveryopts" did not actually work when
provided on the command line.
2014-02-16 Lenz Grimmer <lenz@grimmer.com>
- BUG#1095690: The mycnf option now accepts both a file name pointing to an
individual my.cnf file as well as a directory name like /etc/mysql to back
up an entire configuration directory. The configuration will be stored
in a subdirectory <prefix>-cnf-<suffix>.
- BUG#1269096: Tar output was always verbose, even if quiet option was set.
2014-02-15 Lenz Grimmer <lenz@grimmer.com>
- BUG#1186570: Check for the existence of the backup LV and bail out
earlier (not when trying to create the LV snapshot)
2013-08-25 Lenz Grimmer <lenz@grimmer.com>
- The purge action now only works for tar and local rsync archives (zbackup
repos would be corrupted, rsnap does its own retention)
2013-08-08 Korjavin Ivan <korjavin@gmail.com>
- Added zbackup backup type
2013-06-11 Lenz Grimmer <lenz@grimmer.com>
- Improved error handling: send out an email if mail_report_on has been
set to "errors" and a log message with log level LOG_ERR was logged.
- Abort and clean up if the snapshot volume could not be mounted
- Abort and clean up if the backup creation failed
- Exit with a non-zero return code if errorstate was set
2013-06-09 Lenz Grimmer <lenz@grimmer.com>
- Enabled timestr() formatting sequences for snapshot volume names, to
create snapshot names which contain a dynamic date value. This can
be useful when thin provisioned snapshots are used as the actual backup
by enabling the keep_snapshot option
2013-06-03 Lenz Grimmer <lenz@grimmer.com>
- Added "thin" option to mylvmbackup.conf (default=0), to enable
thin provisioned LVM snapshots
2013-06-01 Lenz Grimmer <lenz@grimmer.com>
- Added new configuration option "recoveryopts" that allows to modify
the command line options that are passed to the MySQL instance that
performs the InnoDB recovery (BUG#544295 and BUG#1091950)
The current default options are "--skip-networking --skip-grant
--bootstrap --skip-syslog --skip-slave-start" (which better
accommodates MySQL 5.1)
2013-05-30 Lenz Grimmer <lenz@grimmer.com>
- Merged patches from Alexandre Anriot to provide a mail reporting method
which sends the log output via email and a new "purge" action that allows
to only keep a defined number of backups in the backup directory
2013-03-31 Lenz Grimmer <lenz@grimmer.com>
- Applied patch contributed by Klaus Ethgen that removes the annoying LVM
warnings about a leaked file descriptor (DBD:mysql does not add FD_CLOEXEC
on the MySQL socket)
2012-12-16 Lenz Grimmer <lenz@grimmer.com>
- BUG#1086313: mvlvmbackup lacks support for 'thin' LVM snapshots
(Thanks to Neil Wilson for the patch)
2011-11-24 Lenz Grimmer <lenz@grimmer.com>
- BUG#787063: Ensure to clean up temporary .pos files when the snapshot mount
is kept, too
2011-02-14 Lenz Grimmer <lenz@grimmer.com>
- Applied small patch from Norbert Tretkowski: change umask to 077 before
creating the tarball backup files to prevent them from being readable by
everyone
2010-09-21 Lenz Grimmer <lenz@grimmer.com>
- BUG#593220: Fixed the compressarg option for cat (removed the comment)
2010-09-09 Lenz Grimmer <lenz@grimmer.com>
- Applied patch contributed by Ben Bonnel to add a new configuration option
"rsnaprsyncarg" that allows one to pass special options to the rsync process
when using the rsnap backend.
2010-01-09 Lenz Grimmer <lenz@grimmer.com>
- Applied patch provided by Ask Bjørn Hansen to allow targets not to have a
timestamp (e.g. for rsync targets)
2009-09-06 Lenz Grimmer <lenz@grimmer.com>
- Bumped up version number to 0.14
2009-07-02 Lenz Grimmer <lenz@grimmer.com>
- Deleted sample precleanup.pm hook as it has potential to cause harm and
is too specialized on a particular use case (BUG#394668)
2009-06-26 Lenz Grimmer <lenz@grimmer.com>
- 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.
2009-06-20 Lenz Grimmer <lenz@grimmer.com>
- Bumped up version number to 0.13
2009-06-18 Lenz Grimmer <lenz@grimmer.com>
- Fixed allowed format strings for timestamped backupdir and mountdir
directory names
- Updated documentation: added information about hooks as Perl modules,
added new logerr hook to the list of available hooks, use of format
strings for the backupdir and mountdir. Documented the fact that these
directories are now created automatically, if they don't exist.
- Fixed Makefile and RPM spec file to install Perl hooks (and include them
in the distribution)
- Removed the absolute path names to external tools, as they tend to differ
between Linux distributions - ensure to configure $PATH correctly instead
- Added --log-err to the startup options of the InnoDB recovery instance
to redirect logging output to $TMP/mylvmbackup_recoverserver.err (instead
of using the primary instance's error log file, in case it has been defined
in my.cnf)
2009-06-14 Lenz Grimmer <lenz@grimmer.com>
- Merged contributions from Matthew Boehm:
- Added support for date/time formatted file paths for the backupdir
and mountdir. Example: $backupdir=/path/to/%Y/%m/%d will expand to
/path/to/2008/10/02 and backups will go in there.
- Added support to attempt to create $backupdir and $mountdir if they do
not exist.
- Added support for using Perl modules as hook scripts. Module must be
named <hook>.pm and must be a package of type <hook>. Module must
implement ->execute() which is called by mylvmbackup to initiate the
hook. It must return boolean true/false (1 or 0) on success/failure.
->execute() will be passed 2 parameters. The first parameter is a
clone() of the global $dbh. This will allow hook scripts to perform
actions on the DB using the existing connection. The second parameter
is a string containing any messages passed to the run_hook() function.
Module must also implement ->errmsg() which will return a string error
message to be sent to log_msg(). This will be called by mylvmbackup
when ->execute() returns false/0.
- Added new hook, 'logerr'. Called by log_msg() when log severity is
LOG_ERR. Passes $msg to hook script.
2009-06-13 Lenz Grimmer <lenz@grimmer.com>
- Removed the bind mount of the position file directory: copy the config
files (position record and my.cnf) into the writable snapshot directly
- Fixed the backup backends to honor this change, fixed the rsnap plugin
to actually include the config files as well
- Removed some hardcoded /tmp paths with a $TMP variable
- Removed superflous $lvm_version variable
2009-06-07 Lenz Grimmer <lenz@grimmer.com>
- Made Linux LVMv2 a requirement
2009-05-07 Lenz Grimmer <lenz@grimmer.com>
- Applied patch by Tim Stoop: added option --keep_mount which keeps the
snapshot mounted after the mylvmbackup run (which also implies
--keep_snapshot)
2009-03-02 Lenz Grimmer <lenz@grimmer.com>
- Updated all URL references to point to lenzg.net instead of lenzg.org
- Applied small patch from Baron Schwartz to allow reading from ~/.my.cnf
2008-12-17 Lenz Grimmer <lenz@grimmer.com>
- Added project home page URL to the --help output, added note about
the existence of a sample config file to the man page
- Add build date to the version string in the help output
- Fixed check for backupdir to not require it when using rsync to a
remote server or when not doing any backups with backuptype=none
(Thanks to Ronald Bradford for these suggestions)
2008-11-23 Lenz Grimmer <lenz@grimmer.com>
- Added new option "--quiet" that suppresses informal logging output
(warnings and errors will still be printed/logged)
- Small fixes to kjetilho's patch
2008-11-20 Lenz Grimmer <lenz@grimmer.com>
- 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.
2008-10-22 Lenz Grimmer <lenz@grimmer.com>
- 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"
2008-10-01 Lenz Grimmer <lenz@grimmer.com>
- 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()
2008-09-25 Lenz Grimmer <lenz@grimmer.com>
- 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.
2008-09-24 Lenz Grimmer <lenz@grimmer.com>
- Applied patch from Matthew Boehm to make the backup file name
suffix configurable via a "--suffix" option. Updated the man
page accordingly.
2008-09-23 Lenz Grimmer <lenz@grimmer.com>
- Bumped up version number to 0.11
- Applied patch from Matt Lohier to support rsnap as a backup backend
- Updated man page
- Moved the list of contributors from the man page into a separate CREDITS
file, added missing names
- Updated the RPM spec file to include CREDITS
2008-09-03 Lenz Grimmer <lenz@grimmer.com>
- 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.
- Added two new hooks: "backupsuccess" and "backupfailure" which are called
respectively upon success of failure of the backup operation (Bug #264089)
- Updated documentation
2008-07-18 Lenz Grimmer <lenz@grimmer.com>
- 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)
2008-07-10 Lenz Grimmer <lenz@grimmer.com>
- 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
- Updated TODO
2008-07-09 Lenz Grimmer <lenz@grimmer.com>
- 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 this change
2008-06-25 Lenz Grimmer <lenz@grimmer.com>
- The mylvmbackup source tree was moved from Subversion to Bazaar and is now
hosted on Launchpad.net:
2008-04-10 Lenz Grimmer <lenz@grimmer.com>
- Bumped up version number to 0.9
2008-04-09 Lenz Grimmer <lenz@grimmer.com>
- 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
2008-04-04 Lenz Grimmer <lenz@grimmer.com>
- Bumped up version number to 0.8
2008-03-03 Lenz Grimmer <lenz@grimmer.com>
- 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.
2007-10-27 Lenz Grimmer <lenz@grimmer.com>
- Bumped up version number to 0.7
2007-10-27 Lenz Grimmer <lenz@grimmer.com>
- Use mktemp/mkdtemp to generate the random temporary file/directory names
2007-10-27 Robin H. Johnson <robbat2@gentoo.org>
- Add rsync backup type. This is very useful if you want to use mylvmbackup to
create the initial state for your slave servers.
- Shrink the --help output by only listing common options, and referring the
user to the manpage for further information.
2007-10-20 Robin H. Johnson <robbat2@gentoo.org>
- Add support for a trailing argument to tar, can be used for excluding
files.
- Clean up variable ordering and manpage to ensure that all
arguments/configopts are documented.
- Do not start NDB or a replication slave when performing InnoDB recovery
- Separate out the suffix of the tarball (Preparation for rsync and users
that want to use bzip2 or no compression.)
- Use a temporary suffix at the end of the tar backup file to indicate that
it is incomplete.
- Applied patch from Robin H. Johnson: Include the my.cnf file in the backup.
(TODO: make this optional and check for the existence of the file before
copying it)
- Add the ability to run an extra FLUSH TABLES for busy databases where
lvcreate might take a long time (and may overrun the interactivity timeout
on the connection, losing the lock).
2007-09-13 Lenz Grimmer <lenz@grimmer.com>
- Added option "--pidfile" to provide an alternative PID file location for
the second server instance that is started to perform the InnoDB recovery
on the snapshot prior to backing it up (Otherwise it may default to using
the same pid file location that the running server uses and safe_mysqld
will abort) - thanks to Kristian Köhntopp for making me aware of this
problem
- Before discarding the snapshot LV, the output of "lvs <snapshot>" is now
printed out for diagnostics. It contains useful information like "how much
percent of the backing store was used, which helps tuning the size of the
snapshot LV.
- Updated the man page, documented the new pidfile option and added a section
with general hints
2007-07-03 Lenz Grimmer <lenz@grimmer.com>
- Added option "--skip-flush-tables" that performs the snapshot without
flushing the tables to disk beforehand (which is not supported by InnoDB
tables anyway) - this would save time, as the flushing can take some time,
depending on the buffer sizes. (Thanks to Peter Zaitsev for the suggestion)
2007-05-31 Lenz Grimmer <lenz@grimmer.com>
- Bumped up version number to 0.6
- Updated man page and README to list all required Perl modules
(thanks to Scott Kaminiski for pointing this out)
- Replaced the call to the external /bin/date binary for creating
the timestamp string with a builtin function (using Date::Format)
2007-05-07 Lenz Grimmer <lenz@grimmer.com>
- Bumped up version number to 0.5
- Slightly reworked Eric's patch and performed some minor code cleanup
- Documented the InnoDB recovery option in the man page
2007-04-12 Eric Bergen <eric@provenscaling.com>
- Added Option "--innodb-recover", which provides an option to run InnoDB
recovery on LVM2 snapshots (which provide write access to the device) prior
to creating the backup archive. This speeds up resuming a MySQL instance
from a restored backup. Also fixed a bug with the default value handling
for command line options. In version 0.4 if a config file was specified
default values in the script were all changed to blank. This means that
the config file had to supply values for every variable instead of just
the values that need to be changed from default.
2007-01-14 Lenz Grimmer <lenz@grimmer.com>
- Bumped up version number to 0.4
- Fixed DSN string handling (thanks to Peter Zaitsev for spotting this)
- removed a few unused configuration options from the config file (we can
re-add them once they are really used)
- Slightly cleaned up Robin's changes, updated the man page and help output
- Fixed logging to the console (log levels were not printed)
2007-01-12 Robin H. Johnson <robbat2@gentoo.org>
- Clean up option handling to load the defaults, followed by the default
configuration file, followed by an alternative configuration file
(specified via CLI arguments), followed by the remainder of the CLI
arguments.
- Do cleanups on directory inputs for spaces and trailing slashes.
- Enforce a non-empty prefix at all times.
- Change the capture of the position file and tarball creation to not use
absolute paths, and instead use them relative to $mountdir.
- Utilize a bindmount to get the position directory near the $mountdir for
the tarball creation.
- 'use vars' has been deprecated by upstream way back in Perl-5.6.0
http://perldoc.perl.org/vars.html, use 'my' instead.
2006-11-24 Lenz Grimmer <lenz@grimmer.com>
- Cleaned up Fred's patch a bit: added --help output and corrected the option
handling. Provide sane default values when no option file is used.
- Only require SyS::Syslog if we actually use syslog for logging (less
Perl module dependencies)
- Slightly beefed up the console logging by printing a time stamp in front
of the message and display "Info/Warning/Error/" according to the log
level.
- Removed syslog_ident and syslog_args from the command line options and
config file (these remain hardcoded)
- added check for hostname, if remote logging is requested
- Updated and reformatted the help output
- Changed the name of the default logging from "standard" to "console"
- Added descriptions of the new logging options to the man page
- Released as version 0.3
2006-11-23 Fred Blaise <fred.blaise@gmail.com>
- Added functionality to use syslog for logging activity. This requires
the Sys::Syslog Perl module.
- Bugfix: in GetOptions, tar and umount were pointing to the mount binary.
- Do not append a '/' to $mountdir if $prefix is empty.
- Bugfix: Corrected variable 'date_format' back to 'datefmt'
- Bugfix: Removed tailing slash for backupdir and mountdir in config file to
avoid resulting double slash with unused variable
- Bugfix: Fixed wrong section assignation of $prefix (misc, instead of lvm),
which resulted in uninitialized value.
2006-11-23 Lenz Grimmer <lenz@grimmer.com>
- slightly cleaned up Fred's patch, reverted using the previous default values
and match the variables used in the config file with the command line
options
- Updated TODO (supporting external config files is done, thanks)
- bumped up version number to 0.3
- Added installing of the config file to the Makefile
- Changed the default LVM snapshot size from 10M to 5G to match the defaults
- Added the config file to the RPM file list
- Changed the script to still work without the configfile, falling back to
builtin defaults (to revert the previous behavior).
- Started converting the man page to asciidoc for easier maintenance and
more possibilities to convert to other formats like HTML or DocBook.
- Renamed the man page input file, added man page building with a2x to the
Makefile
2006-11-22 Fred Blaise <fred.blaise@gmail.com>
- Added initial support for using an external /etc/mylvmbackup.conf
configuration file (requiring the Config::IniFiles Perl module)
2006-11-21 Lenz Grimmer <lenz@grimmer.com>
- Removed the START/STOP SLAVE calls (They cause problems where the box isn't
a slave, and don't actually help anything where the box is a slave) - thanks
to Robin H. Johnson <robbat2@gentoo.org> for reporting this and Fred Blaise
for verifying it.
2006-11-15 Lenz Grimmer <lenz@grimmer.com>
- Added Makefile to perform various build and installation tasks
- Renamed the mylvmbackup source file to mylvmbackup.pl.in, which
is turned into the mylvmbackup executable by the Makefile
- Added RPM spec file to build RPM packages
- Updated Version to 0.2 (now defined in the Makefile)
- Updated INSTALL file, now one can run "make install" instead of manually
copying the files
- Updated TODO list
- Released as version 0.2
2006-11-14 Lenz Grimmer <lenz@grimmer.com>
- Documented Robin's changes in the man page, cleaned up the man page
in general
- Added new option: 'datefmt' that allows one to define the format of
the date time stamp in the backup file name
2006-11-12 Robin H. Johnson <robbat2@gentoo.org>
- General cleanup, intended to make mylvmbackup usable for distributions.
- Add --xfs to help with using XFS snapshots (adds nouuid per LVM HOWTO)
- Support for relative paths within the datadir LV.
- Sane default locations for the snapshot mount point and the backup
directory. Distributions should create /var/tmp/mylvmbackup/mnt/ and
/var/tmp/mylvmbackup/backup/ on installation of mylvmbackup.
- Add a prefix name for backups, to enable multiple parallel backups.
- Add host/port/socket support for connecting to MySQL properly.
- Give a little more output during the backup process.
- Change the position file format to be a key/value pair style.
- Capture the slave and master status during position capture.
- Hidden option: 'tararg' to override the default 'cvzf' parameter to tar.
- Hidden option: 'backuplv' to control the name of the snapshot LV.
2006-05-05 Lenz Grimmer <lenz@grimmer.com>
- Initial version 0.1
- Moved out of the internal BK repository, added GPL license and additional info
|