The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

narada-mysqldump - dump project database

VERSION

This document describes narada-mysqldump version v1.4.5

USAGE

    narada-mysqldump

DESCRIPTION

Backup your Narada project's MySQL database.

If "config/db/db" absent or empty do nothing.

Dump database as quickly as possible to files "var/sql/*.sql":

  • Tables listed in "config/db/dump/ignore" doesn't included in dump (even in database scheme).

  • Database scheme saved in "var/sql/db.scheme.sql".

  • Content for tables listed in "config/db/dump/empty" doesn't dumped.

  • Content for tables listed in "config/db/dump/incremental" saved in "var/sql/TABLE_NAME.FROM-TO.sql".

    • Only new rows will be saved, which is absent in already existing files.

  • Content for other tables saved in "var/sql/TABLE_NAME.sql".

    • If table wasn't changed since previous dump - do nothing and just keep file with previous dump.

  • All other "*.sql" files will be removed from "var/sql/".

To force full dump (including incremental and unchanged tables) run "rm var/sql/*.sql" before "narada-mysqldump".

Will set exclusive lock on this project while doing database analyse and dumping database scheme and non-incremental tables. Incremental tables will be dumped after releasing lock.

Will set dump file's mtime to Update_time of related database table, and use mtime on next dump to detect table change.

All incremental tables MUST have first column's type "INT AUTO_INCREMENT PRIMARY KEY" (can also use "MEDIUMINT", etc.).

After ALTERing incremental table or doing TRUNCATE existing files with incremental dumps will be automatically removed and replaced by new ones.

Tables listed in "config/db/dump/empty" and "config/db/dump/incremental" must exists; listed in "config/db/dump/ignore" may not exists.

Script must be executed only from "project root directory".

CONFIGURATION AND ENVIRONMENT

narada-mysqldump use these configuration files:

    config/db/db
    config/db/login
    config/db/pass
    config/db/host
    config/db/port
    config/db/dump/incremental
    config/db/dump/empty
    config/db/dump/ignore

SUPPORT

Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker at https://github.com/powerman/Narada/issues. You will be notified automatically of any progress on your issue.

Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license. Feel free to fork the repository and submit pull requests.

https://github.com/powerman/Narada

    git clone https://github.com/powerman/Narada.git

Resources

AUTHOR

Alex Efros <powerman@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2008-2015 by Alex Efros <powerman@cpan.org>.

This is free software, licensed under:

  The MIT (X11) License