aboutsummaryrefslogtreecommitdiff
path: root/restore.in
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2014-03-18 23:17:42 +0200
committerSergey Poznyakoff <gray@gnu.org>2014-03-18 23:33:29 +0200
commit10d30373c6fdf0dd23f16251fa2302c18b7eef97 (patch)
tree5a87a201d719266e6917758f1325f2b8820ce81b /restore.in
parentb731a0350721ec4a11959446fac93962394711b3 (diff)
downloadbeam-10d30373c6fdf0dd23f16251fa2302c18b7eef97.tar.gz
beam-10d30373c6fdf0dd23f16251fa2302c18b7eef97.tar.bz2
Allow for dumping each MySQL database into a separate file.
* 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.
Diffstat (limited to 'restore.in')
-rw-r--r--restore.in10
1 files changed, 5 insertions, 5 deletions
diff --git a/restore.in b/restore.in
index 16a5430..c1dc0c6 100644
--- a/restore.in
+++ b/restore.in
@@ -1,6 +1,6 @@
#! /bin/sh
# This file is part of BEAM
-# Copyright (C) 2012 Sergey Poznyakoff
+# Copyright (C) 2012-2014 Sergey Poznyakoff
#
# BEAM is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -121,9 +121,9 @@ if [ -z "$week" ]; then
fi
if [ -z "$round" ]; then
- round=$(find $backup_archive_dir \
+ round=$(beam_exec find $backup_local_archive_dir \
-regex '.*-'$week'-[0-9][0-9]*-[0-9][0-9]*\..*' \
- -printf '%f\n' |
+ -printf '%f\\n' |
sed 's/.*-'$week'-\([0-9][0-9]*\)-[0-9][0-9]*\..*/\1/' |
sort +0 -1 |
tail -1)
@@ -131,9 +131,9 @@ if [ -z "$round" ]; then
fi
if [ -z "$level" ]; then
- level=$(find $backup_archive_dir \
+ level=$(beam_exec find $backup_local_archive_dir \
-regex '.*-'$week-$round'-[0-9][0-9]*\..*' \
- -printf '%f\n' |
+ -printf '%f\\n' |
sed 's/.*-'$week-$round'-\([0-9][0-9]*\)\..*/\1/' |
sort +0 -1 |
tail -1)

Return to:

Send suggestions and report system problems to the System administrator.