# Example of configuration file.
#   .
#
# http://www.opennet.ru/dev/fsbackup/
# Copyright (c) 2001 by Maxim Chirkov. <mc@tyumen.ru>
#

#-------------------
# Name of backup, single word.
#   ,     ,    .
#-------------------

$cfg_backup_name = "test_host";


#-------------------
# Path of internal cache directory for local backup method.
#         , 
#     .
#-------------------

$cfg_cache_dir = "/usr/local/fsbackup/cache"; 


#-------------------
# Full path of some external program running from C<fsbackup.pl>.
# $prog_gzip = "" - not use compression, $prog_pgp = "" - not use encryption.
#        .  
#         .
#  !     gpg,  
#   $prog_gzip="",   gpg   
# ,  gzip         CPU.
#-------------------

$prog_md5sum	= "md5sum -b";
$prog_tar	= "tar";
$prog_ssh	= "ssh";
$prog_rm	= "rm";
$prog_gzip	= "gzip"; #   "",    .
$prog_pgp	= "gpg";  #   "",    .


#-------------------
# Checksum method: 
#	timesize - checksum of file attributes (default, best speed) 
#	md5      - checksum of file attributes + MD5 checksum of file content.
#         .
#	timesize -     ,  ,
#		    ,    .  
#		         
#		      .   .
#	md5	 -   timesize +   
#		   .     .
#-------------------

$cfg_checksum = "timesize"; 


#-------------------
# Backup style:
#	backup	    - incremental backup (copy only new and changed files).
#	full_backup - full backup (copy all files).	
#	sync	    - file tree synchronization.
#	hash	    - hash creation without storing archive (spying for new or changed files).
#   ,  .
#	backup      -     (..   
#		           )..
#	full_backup -    ,   (..   
#		       ).
#	sync        -   (    ssh  local).
#	hash	    -   ,     
#		      (    ,   )
#-------------------

$cfg_backup_style = "backup"; 


#-------------------
# Incremental level (after how many incremental copy make full refresh of backup)
#   ,   ,    
#  . ,  = 7 - 6     ,
#  7       . 0 -   .
#-------------------

$cfg_increment_level = 7; 


#-------------------
# Save previous backup to OLD directory before rotation or before storing 
# full backup.
# 0 - don't save old backup
# 1 - save old backup.
#          
#      .
#      OLD.
# 0 -    .
# 1 -   
#-------------------

$cfg_save_old_backup = 1;


#-------------------
# Type of backup storage:
#	local 	   - store backup on local file system.
#	remote_ssh - store backup on remote host over SSH connection.
#	remote_ftp - store backup on remote FTP server.
#    .  .   README.
#	local 	   -      .
#	remote_ssh -        SSH
#	remote_ftp -       FTP
#-------------------

$cfg_type = "local";


#-------------------
# Connection parameters for remote_ssh storage type.
#       ssh  ftp:
#-------------------

$cfg_remote_host = "backup-server.test.ru";
$cfg_remote_login = "backup_login";
$cfg_remote_path = "/home/backup_login/backup";

#-------------------
# FTP transfer mode. If set to a non-zero value then all data transfers will 
# be done using passive mode. This is not usually required except for some dumb
# servers, and some firewall configurations.
#    FTP  (  ).
# 0 - Active .
# 1 - Passive  (  ftp     ).
#-------------------

$cfg_remote_ftp_mode = 0;

#-------------------
# Password of remote login for remote_ftp storage type.
#       ftp:
#-------------------

$cfg_remote_password = "Test1234";


#-------------------
# Path of directory to store backup on local file system for local storage type.
#        :
#         .   , 
# , archive.
#-------------------

$cfg_local_path = "/usr/local/fsbackup/archive";


#-------------------
# Limit of file creation time in days.
# If not 0, don't backup files created or modified later then $cfg_time_limit days.
#   ,         . 
# 0 -        .
#-------------------

$cfg_time_limit = 0;


#-------------------
# Limit of maximum file size.
# If not 0, don't backup files witch size more then $cfg_time_limit kilobytes.
#      Kb    . 
# 0 -       .
#-------------------

$cfg_size_limit = 0;

#-------------------
# Size of maximum size (in KiloBytes) of single unpacked archive file (volume).
# 0 - unlimited file size.
#   ( Kb)    ,    
# , ..  .        
#           CD-ROM 
#     .
#    ,      c
#  '-2', '-3'  ..
# 0 -    .
#-------------------

$cfg_maximum_archive_size = 0;


#-------------------
# Root path for initial chdir.
#  ,        
#       .
#-------------------

$cfg_root_path = "/";


#-------------------
# Name of user in public key ring with public key will be used for PGP encryption.
# Not use encryption if not set.
#     PGP.
#    ,  pgp  .
#    UserId   public key ring.
#-------------------

# $cfg_pgp_userid = "backup";


#-------------------
# Verbose level.
#	0	- Silent mode, suspend all output, except fatal configuration 
#		  errors.
#	1	- Output errors and warnings.
#	2	- Output all the  available  data.
#
#  "",     .
#	0 	-    .
#       1 	-      
#       2       -   
#-------------------

$cfg_verbose = 2;

#-------------------
# Recursive review of the prohibited directories.
#	0	- Recursively to view all contents of directories marked for 
#		  backup, including contents of directories prohibited by 
#		  '!', '!d' and '=! rules.
#	1	- not use a recursive entrance to directory prohibited for 
#                 backup (speed is increased, reduces flexibility of customization).
#
#    .
#	0 	-      
#		  ,        
#		  '!', '!d'  '=!'.
#       1 	-        
#		   (  ,  
#		  ).
#-------------------

$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.
#
#
#
#        .
# (   __DATA__):
#  /dir[/file] -   /  .
#  !/dir[/file] -  ,    .  ,   .
#  # - 
# :
#  =~ -     ,    .    .
#  f~ -   .    .
#  d~ -   .    .
#  :
#  =! - ""     ,    .    .
#  f! - ""   .    .
#  d! - ""   .    .
#
#
#           .
#        .
#     ,     , 
#  ""    ,   :
# 
#
#  :
# Operation priority:
#
#    1.	=!
#    2.	f!
#    3.	f~
#    4.	d!
#    5.	=~
#    6.	d~
#    7.	!
#    8. path
#
#  :
#  /usr/home		#  /usr/home   ,
#  !/usr/home		#   .
#  d~public_html
#  /var
#  d!var/log
#  f~netconf\.log.*
#  
#     /usr/home/*/public_html    , 
#     /var/log/var/log/,   messages, . 
#  , /usr/local/home/user/public_html   
#     !       :
#  /
#  !/
#  d~public_html
#  d~cgi-bin
#  d~/etc/
#-------------------

__DATA__ 
/usr/local/fsbackup
!/usr/local/fsbackup/cache
f!\.core$
f!^core$
f!\.o$
f!\.log$
#d~public_html
#d!/log
#f~netconf\.log.*

# Linux
/usr/src/linux/.config

# BSD
/var/db/pkg
/usr/src/sys/i386/conf

# Users
/home
/root
!/home/ftp
=!\.netscape/cache/
=!\.mozilla/.*/Cache/
=!\.mozilla/.*/NewCache/
=!\.mozilla/.*/News/
f!.*\.avi$
f!.*\.mpeg$
f!.*\.mpg$
f!.*\.mp3$

# System configuration
/etc
/var/cron/tabs
/var/spool/cron
/usr/local/etc

# Installed packages
/usr/local/bin
/usr/local/include
/usr/local/lib
/usr/local/libdata
/usr/local/libexec
/usr/local/sbin
/usr/local/share
/var/ucd-snmp

# Programs from source
/usr/local/apache/bin
/usr/local/apache/conf
/usr/local/apache/cgi-bin
/usr/local/apache/htdocs
/usr/local/apache/libexec
/usr/local/apache/src
/usr/local/www
/usr/local/mysql/bin
/usr/local/mysql/include
/usr/local/mysql/lib
/usr/local/mysql/libexec
/usr/local/mysql/var/mysql
/usr/local/pgsql/bin
/usr/local/pgsql/share
/usr/local/pgsql/lib
/usr/local/pgsql/include
/usr/local/pgsql/data
!/usr/local/pgsql/data/base
!/usr/local/pgsql/data/pg_xlog
/usr/local/squid/bin
/usr/local/squid/etc
/usr/local/news/etc
/usr/local/news/bin
/usr/local/news/lib
/usr/local/samba/bin
/usr/local/samba/lib

