Subversion Repositories general

Compare Revisions

No changes between revisions

Ignore whitespace Rev 1263 → Rev 1264

/fsbackup/trunk/create_backup.sh
0,0 → 1,70
#!/bin/sh
# Backup planner running from crontab.
#
# http://www.opennet.ru/dev/fsbackup/
# Copyright (c) 2001 by Maxim Chirkov. <mc@tyumen.ru>
#
#18 4 * * * /root/backup/fsbackup/create_backup.sh| mail -s"`name -n` backup report" root
 
#--------------------------------------
# Path where fsbackup installed.
#--------------------------------------
 
backup_path="/home/dev/prog/fsbackup"
 
 
#--------------------------------------
# List of fsbackup configuration files, delimited by spaces.
# Directories for saving backup in each configuration file should differ
# ($cfg_remote_path, $cfg_local_path).
#--------------------------------------
 
config_files="test_backup.conf"
 
 
#--------------------------------------
# 1 - run mysql_backup.sh script (you need edit mysql_backup.sh first!), 0 - not run.
#--------------------------------------
 
backup_mysql=0
 
#--------------------------------------
# 1 - run pgsql_backup.sh script (you need edit pgsql_backup.sh first!), 0 - not run.
#--------------------------------------
 
backup_pgsql=0
 
 
#--------------------------------------
# 1 - run sysbackup.sh script (you need edit sysbackup.sh first!), 0 - not run.
#--------------------------------------
 
backup_sys=0
 
 
 
#############################################################################
cd $backup_path
 
#ulimit -f 512000;ulimit -d 20000;ulimit -c 100;ulimit -m 25000;ulimit -l 15000
 
if [ $backup_mysql -eq 1 ]; then
./scripts/mysql_backup.sh
fi
 
if [ $backup_pgsql -eq 1 ]; then
./scripts/pgsql_backup.sh
fi
 
if [ $backup_sys -eq 1 ]; then
./scripts/sysbackup.sh
fi
 
for cur_conf in $config_files; do
nice -19 ./fsbackup.pl ./$cur_conf
next_iter=`echo "$config_files"| grep "$cur_conf "`
if [ -n "$next_iter" ]; then
sleep 600
fi
done
 
Property changes:
Added: svn:executable
+*
\ No newline at end of property