3
# This script backs up OpenVista instances that have backup_daily set to "yes"
4
# in their etc/backups.conf.
6
# The /etc/cron.daily/openvista script runs once per day and backs up instances
7
# one after another to avoid excessive I/O from all the instances being backed
10
# If you want an instance to be backed up on a custom schedule, set
11
# backup_daily to "no" in its etc/backups.conf and add an entry for this
12
# instance in /etc/cron.d/openvista.
15
# Copyright (C) 2009 Medsphere Systems Corporation
17
# This program is free software; you can redistribute it and/or modify it solely
18
# under the terms of the GNU Affero General Public License version 3 as published
19
# by the Free Software Foundation.
21
# This program is distributed in the hope that it will be useful, but WITHOUT
22
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
26
# You should have received a copy of the GNU Affero General Public License
27
# along with this program. If not, see <http://www.gnu.org/licenses>.
29
# You can contact Medsphere Systems Corporation headquarters at 1917 Palomar
30
# Oaks Way, Suite 200, Carlsbad, CA 92008 or at legal@medsphere.com.
35
for instance in `ls $root`; do
36
# the default is "yes" unless the etc/backups.conf file exists and it has
37
# backup_daily set to "no"... in other words, an instance has to "opt out"
40
if [ -e "$root/$instance/etc/backups.conf" ]; then
41
. "$root/$instance/etc/backups.conf"
44
case "$backup_daily" in
45
""|"no"|"No"|"NO"|"false"|"False"|"FALSE"|"0")
46
# skip backing up this instance