3 # Copyright (C) 2014 Georgia Public Library Service
4 # Chris Sharp <csharp@georgialibraries.org>
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # A script to grab all of PINES' utility server data and configuration
20 # that needs to be moved to the new utility01 as created by GenaSYS.
23 ARCHIVE_DIR="utility01-prod-`date +%F`"
24 CONF_DIR="/openils/conf"
25 SCRIPT_DIR="/home/opensrf/eg"
26 OVERDUE_DIR="/openils/var/data/overdue"
27 OFFLINE_DIR="/openils/var/data/offline"
29 if [ ! -d $ARCHIVE_DIR ]; then
34 echo "Could not cd to $ARCHIVE_DIR."
38 echo "Copying configuration directory $CONF_DIR..."
40 echo "Copying scripts directory $SCRIPT_DIR..."
42 echo "Copying overdue data directory $OVERDUE_DIR..."
44 echo "Copying offline data directory $OFFLINE_DIR..."
48 echo "Could not cd to $WORKING_DIR"
52 echo "Compressing directory..."
53 tar czvf $ARCHIVE_DIR.tar.gz $ARCHIVE_DIR