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
/fsbackup/trunk/test_backup.conf
0,0 → 1,53
$cfg_backup_name = "test";
$cfg_cache_dir = "/home/dev/prog/fsbackup/cache";
 
$prog_md5sum = "/sbin/md5";
$prog_tar = "/usr/bin/tar";
$prog_rm = "/bin/rm";
 
$cfg_checksum = "timesize";
$cfg_increment_level = 100;
$cfg_save_old_backup = 1;
$cfg_move_old_backup = 0;
$cfg_exit_on_empty = 0;
 
$cfg_local_path = "/home/dev/prog/fsbackup/backup";
 
$cfg_time_limit = 0;
$cfg_size_limit = 0;
$cfg_maximum_archive_size = 102400;
 
$cfg_root_path = "/";
$cfg_verbose = 2;
$cfg_stopdir_prune=0;
 
1;
#-------------------
# List of backuped path and regexp mask.
# /dir[/file] - backup file or directory.
# !/dir[/file] - NOT include this file or directory to backup.
# # - ignore this line.
# Mask:
# =~ - regexp mask for include file or directory to backup.
# f~ - regexp file mask for include file to backup.
# d~ - regexp directory mask for include directory to backup.
# =! - regexp mask for NOT include file or directory to backup.
# f! - regexp file mask for NOT include file to backup.
# d! - regexp directory mask for NOT include directory to backup.
#
# Operation priority:
#
# 1. =!
# 2. f!
# 3. f~
# 4. d!
# 5. =~
# 6. d~
# 7. !
# 8. path
#
 
__DATA__
/home/dev/prog/fsbackup/data
!/home/dev/prog/fsbackup/data/tmp
 
/fsbackup/trunk
Property changes:
Added: svn:ignore
+cache
+restore
+backup
+data
+