aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFiles
2017-03-15Minor changesperlSergey Poznyakoff1
* lib/App/Beam/Config.pm (check_mandatory): Remove (fixup): Rewrite to implement mandatory variable checking.
2017-03-13Implement the 'lint' subcommand.Sergey Poznyakoff2
2017-03-13Keep file names in the history.Sergey Poznyakoff5
Each backup method takes an additional argument - a history item object - and is supposed to store there the names of the files it created. This information will then be used when expiring backups and, eventually, when restoring from them. * lib/App/Beam/Backend/Tar.pm (backup): Take Item object as the 2nd parameter. Add names of the created file to it. * lib/App/Beam/Backup.pm (run): Pass the Item object to the backend method. * lib/App/Beam/History/Item.pm: New file. * lib/App/Beam/History/Record.pm (begin_entry): Rename to begin_item (entries): Rename to items. (entry_names): Rename to item_names. (finish_entry): Rename to finish_item. * lib/App/Beam/List.pm (run): List file names in verbose mode.
2017-03-10Implement the backup --redo optionSergey Poznyakoff4
* lib/App/Beam.pm (isscalar): Rename to isvariable to finish 90cfc43a. * lib/App/Beam/Backup.pm: New option: --redo. * lib/App/Beam/History.pm (drop): New method. * lib/App/Beam/History/Record.pm (reset): New method.
2017-03-10Ensure consistent exit code; standardize verbosity levelsSergey Poznyakoff5
2017-03-10Initial implementation of the restore subcommandSergey Poznyakoff9
* lib/App/Beam/History.pm: New file. * lib/App/Beam/History/Entry.pm: New file. * lib/App/Beam/History/Record.pm: New file. * lib/App/Beam.pm (lock,unlock) (compute_triplet,status_result) (set_result): Remove. Use App::Beam::History instead. (begin): Create a History object. (end): Save the History object. (check_items): New method. * lib/App/Beam/Backend.pm (status): Remove. (record, restore): New method. * lib/App/Beam/Restore.pm: New file. * beam: Implement restore subcommand. * lib/App/Beam/Backend/Tar.pm: Likewise. * MANIFEST: Update. * lib/App/Beam/Backup.pm: Update. * lib/App/Beam/List.pm: Update.
2017-03-09Implement informational options for each subcommandSergey Poznyakoff2
* Makefile.PL: Update. * beam (VERSION): New variavble. Analyze informational options prior to invoking the selected module's run method. * lib/App/Beam/Backup.pm: Add POD markup. * lib/App/Beam/List.pm: Likewise.
2017-03-08Minor fixesSergey Poznyakoff1
2017-03-07Store backup results for each backup item individuallySergey Poznyakoff6
* lib/App/Beam.pm (RESULT_*): New constants. (set_result): Take 3 arguments. * lib/App/Beam/Backend/Tar.pm (backup): Capture stderr. * lib/App/Beam/Backup.pm: Check number of command line arguments. * lib/App/Beam/Command.pm (set_logger): New method. * lib/App/Beam/List.pm: New command line option --verbose.
2017-03-07Catch exceptions in open3Sergey Poznyakoff2
2017-03-07Initial implementation of the list subcommandSergey Poznyakoff5
* MANIFEST: Update * lib/App/Beam/List.pm: New file. * beam (list): New subcommand * lib/App/Beam.pm: End with 1; * lib/App/Beam/Command.pm: Likewise. * lib/App/Beam/Config.pm: Likewise. * lib/App/Beam/Config/Locus.pm: Likewise.
2017-03-07Implement tar backupSergey Poznyakoff6
* lib/App/Beam/Config.pm (get): Return dereferenced array and hash refs. (__lint): Fix array collection. * lib/App/Beam.pm (%parameters): Mark unhandled keywords as arrays (logger): Read from fd, if passed as the first argument. (logcommand): New method. * lib/App/Beam/Backend.pm: New file. * lib/App/Beam/Backend/Tar.pm: New file. * lib/App/Beam/Backup.pm (run): Assume result OK, unless already set otherwise. * lib/App/Beam/Command.pm: New file. * MANIFEST: Update.
2017-03-04Improve config syntax verification.Sergey Poznyakoff1
Fix processing of the '*' entry in the syntax hashes. The entry '*' => '*' in the syntax hash declares that any settings and any subsections are also allowed.
2017-03-04Improve the lint methodSergey Poznyakoff1
* lib/App/Beam/Config.pm (parse_section): Return a tuple. Take locus as parameter. Set locations for all intermediary sections. (check_mandatory): Use the 'select' callback if it is defined. (readconfig): Take exactly two arguments. (lint): Rewrite.
2017-03-04Always keep locus with each statement; phase out the locations keyword.Sergey Poznyakoff3
2017-03-03Locus: correctly handle uninitialized locationsSergey Poznyakoff1
2017-03-03Implement lint() methodSergey Poznyakoff1
* lib/App/Beam/Config.pm: Keep count of errors in the error_count member. (getref): Take into account the {ci} setting. (flatten): Minor fix. (lint): New method. * t/TestConfig.pm (lint): Overload method. * t/conf06.t: New test case.
2017-03-02Small improvement of the config parser.Sergey Poznyakoff1
* lib/App/Beam/Config.pm: Keep ordinal numbers (relative positions in the source file) of statements. (flatten): Rewrite method. * t/TestConfig.pm: Update.
2017-03-02Document App::Beam::ConfigSergey Poznyakoff1
Rename the isscalar method to isvariable.
2017-03-02Rework configuration class to support optional "locations" mode.Sergey Poznyakoff4
When location => 1 is passed to the constructor, the created class will store source locations along with the configuration variables. * lib/App/Beam/Config.pm (error): Use the passed Locus object. (new): New kw parameter "locations" controls whether source locations are stored along with each configuration variable. (check_mandatory): Handle wildcard parameter declarations. (readconfig): Pass locations to all functions as Locus objects. Store them if required. (get): Rewrite to retrieve locations on request. (isset,issection,isscalar): Rewrite. (set): Handle the locations mode. (names_of): New method. * lib/App/Beam/Config/Locus.pm: New file. * MANIFEST: Add new files. * lib/App/Beam.pm (parameters): Declare "backend" and "item" sections. (new): Enable locations mode. (logger, logger_line): Redo to make use of the passed Locus object. (load_backends): New method. * t/TestConfig.pm: Rewrite. * t/conf01l.t: New test case. * t/conf02l.t: New test case. * t/conf03l.t: New test case. * t/conf04l.t: New test case. * t/conf05l.t: New test case. * t/locus.t: New test case.
2017-02-28Improve run-time configuration framework; provide boilerplate for the backup ↵Sergey Poznyakoff3
subcommand
2017-02-16Implement list configuration variablesSergey Poznyakoff1
2017-02-16Improve config parser. Add more tests.Sergey Poznyakoff1
* MANIFEST: Update. * lib/App/Beam/Config.pm: Rewrite 'error' as method. Check for missing mandatory statements. * t/TestConfig.pm: New file. * t/conf01.t: New file. * t/conf02.t: New file. * t/conf03.t: New file. * t/config.t: Remove. * t/f.conf: Remove.
2017-02-16Starting rewrite in PerlSergey Poznyakoff10
2014-03-19Minor fixSergey Poznyakoff1
2014-03-19Use uniform indentation, add missing copyleft headers, update years.Sergey Poznyakoff6
2014-03-18Allow for dumping each MySQL database into a separate file.Sergey Poznyakoff2
* lib/beam/common.in (load_config): Set beam_rsh and backup_local_archive_dir. (beam_exec): New function. * lib/beam/mysql.sh (dump_mysql_db) (restore_mysql_db): New functions. (mysql_backup,mysql_restore): Dump databases individually, depending on the value of <item>_alldb variable. * restore.in: Use beam_exec to run find. * doc/beam.conf.5in: Document changes.
2013-07-31Version 1.4.90Sergey Poznyakoff1
* NEWS: Version 1.4.90 * configure.ac: Likewise. * lib/beam/common.in (beam_lock): Bugfix.
2013-03-21Prevent reentrant invocations. Minor bugfix.Sergey Poznyakoff2
At startup a pid file is checked. If it exists, another beam process is assumed to be running and start up is aborted. Otherwise a new pid file is created. The existing pid is removed before exiting (by epilogue_hook). * backup.in (prologue_hook): Prepend beam_lock. * lib/beam/common.in (backup_pidfile): New global. (beam_lock,beam_unlock): New functions. * lib/beam/s3.sh (s3_getmpoint): Fix regexp to take into account s3backer invocation without --vhost.
2013-02-15Fix a minor bugSergey Poznyakoff1
* lib/beam/fs.sh (initdb): Print diagnostics before overwriting the variable it uses.
2012-12-04Bugfix.Sergey Poznyakoff1
* lib/beam/fs.sh (fs_restore): Fix the hardcoded file suffix.
2012-10-30Create database dumps in temporary directory.Sergey Poznyakoff3
* backup.in: Set safe umask. * lib/beam/common.in (backup_tmp_dir): New global variable. * beam.conf: Add backup_tmp_dir variable. * doc/beam.conf.5in: Document new variables. * lib/beam/mysql.sh: Create temporary files in backup_tmp_dir * lib/beam/postgres.sh: Likewise.
2012-07-13Add a LDAP backup module.Sergey Poznyakoff7
* lib/beam/ldap.sh: New file. * lib/beam/Makefile.am (libbackup_SCRIPTS,EXTRA_DIST): Add ldap.sh. * beam.conf: Update, mention new backup type. * doc/beam.conf.5in: Update. * lib/beam/common.in (load_config): If backup_archive_dir is not set, and S3 backup is configured, set backup_archive_dir to $backup_mp_s3. (beam_logrotate): Add missingok to the logrotate configuration. * lib/beam/fs.sh: List configuration keywords. * lib/beam/mysql.sh: Likewise. * lib/beam/postgres.sh: Likewise. * lib/beam/s3.sh: Likewise.
2012-07-04Minor improvement.Sergey Poznyakoff1
* lib/beam/fs.sh: Fall back to level 0 if the previous snapshot file does not exist. This allows to add new items in the middle of the week.
2012-07-04Implement list command.Sergey Poznyakoff3
* list.in: New file. * .gitignore: Add list.sh * Makefile.am: Build and install list.sh * lib/beam/fs.sh: Implement list method. * lib/beam/mysql.sh: Likewise. * lib/beam/postgres.sh: Likewise.
2012-07-03Use "logit" instead of "echo".Sergey Poznyakoff3
2012-06-27Minor changes.Sergey Poznyakoff1
* beam.conf (backup_logrotate_conf): Initialize variable. * cleaner.in: Include more detail in the initial verbose header. * lib/beam/common.in (beam_logrotate): Pass $verbose to logrotate.
2012-06-26Provide a default log rotate hook.Sergey Poznyakoff1
* Makefile.am (build.sed): Define LOCALSTATEDIR and DATAROOTDIR. * beam.conf (openlog_hook): Initialize to beam_logrotate. * doc/beam.conf.5in: Document openlog_hook and its default. * lib/beam/common.in (beam_logrotate): New function.
2012-06-26Provide a new hook, to be run prior to opening the log file.Sergey Poznyakoff1
* backup.in (backup): Run openlog_hook. * beam.conf (openlog_hook): Document the hook. * doc/beam.conf.5in: Likewise. * lib/beam/common.in (load_config): Insert s3_mount at the beginning of the prologue_hook.
2012-06-19Minor bug-fixes.Sergey Poznyakoff2
* backup.in (backup): Propagate the --dry-run option to beam-cleaner. * lib/beam/mysql.sh (mysql_backup): Fix hardcoded base name. * lib/beam/postgres.sh (postgres_backup): Likewise.
2012-06-14Bugfixes.Sergey Poznyakoff2
* doc/beam-restore.1in: Fix typo. * doc/beam.conf.5in: Fix section number in TH. Document changes to mysql module. * lib/beam/mysql.sh: Empty database name means dump all databases. * lib/beam/s3.sh (s3_mount): Fix a typo.
2012-06-13New configuration variable backup_s3_mount_optionsSergey Poznyakoff1
* beam.conf: Document backup_s3_mount_options. * lib/beam/s3.sh: Add backup_s3_mount_options to the list of options passed to mount.
2012-06-05Bugfixes.Sergey Poznyakoff1
* lib/beam/s3.sh: Fix typos.
2012-06-05BugfixesSergey Poznyakoff1
* lib/beam/s3.sh (s3_unmount): Implement --force option. Unless it is given, unmount only mount points from $umount_list. * s3.in: Pass --force option to s3_unmount. * restore.in (getyn): Fix a bashism.
2012-06-05Bugfix.Sergey Poznyakoff1
* lib/beam/mysql.sh: Do not use -A and --batch options with mysql: they disable --defaults-file somehow.
2012-06-01Improve docs.Sergey Poznyakoff5
* NEWS: Update. * README: Rewrite. Provide enough documentation for startup. * doc/beam-cleaner.1in: New file. * doc/Makefile.am: Build and install beam-cleaner.1. * doc/beam-backup.1in: Fix the time-stamp-start variable. * doc/beam-restore.1in: Likewise. * doc/beam-s3.1in: Likewise. * doc/beam.conf.5in: Likewise. * backup.in: Mark with sh magic. * beam.in: Likewise. * lib/beam/common.in: Likewise. * lib/beam/fs.sh: Likewise. * lib/beam/mysql.sh: Likewise. * lib/beam/postgres.sh: Likewise. * lib/beam/s3.sh: Likewise. * restore.in: Likewise. * s3.in: Likewise.
2012-05-31Improve mountpoint detection in s3.Sergey Poznyakoff1
* lib/beam/s3.sh (s3_getmpoint): Some kernels print device name instead of the actual mount file. (s3_unmount): Honor dry_run.
2012-05-31Implement exclusion patterns and additional tar options in the fs module.Sergey Poznyakoff1
* lib/beam/fs.sh: (fs_backup): New keywords ITEM_tar_options, ITEM_exclude and ITEM_exclude_files. * doc/beam.conf.5in: Document new keywords. * examples/Makefile.am: Remove. * examples/backup.conf.s3: Remove. * Makefile.am: Remove examples. * configure.ac: Remove examples.
2012-05-30Honor --dry-run mode when sending mail.Sergey Poznyakoff1
* lib/beam/common.in (dry_mail): New function. (mail_report): Use dry_mail to "send" the message in dry-run mode.
2012-05-30Implement mail notification.Sergey Poznyakoff1
* backup.in (backup): New function. Send mail notification if backup_notify_email is not empty. * lib/beam/common.in (mail_report): New function. * beam.conf: Provide examples for the new variables. * beam.in: Fix typos. * doc/beam.conf.5in: Document new variables.

Return to:

Send suggestions and report system problems to the System administrator.