# #-------------------------------------------------------
# # Kinamu Backup/Restore Client Defintion
# #-------------------------------------------------------
# Client (File Services) to backup

Client {
  Name = CCRM0004-fd
  Address = 192.168.100.42
  FDPort = 9102
  Catalog = MyCatalog
  Password = "geheim"          # password for FileDaemon
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}


# #-------------------------------------------------------
# # Kinamu Client Schdule for Backup
# #-------------------------------------------------------

Schedule {
	Name = SugarCRM_Backup_CCRM0004
	RUN = LEVEL=Full sun at 01:00
	RUN = LEVEL=Incremental mon-sat at 01:00
}


# #-------------------------------------------------------
# # Kinamu Storage Definition
# # Device Definition ist in ccrm0004-sd.conf definiert.
# #-------------------------------------------------------

Storage {
	Name = SugarCRM_CCRM0004
	Address = CBCK0001
	Device = SugarCRM_CCRM0004
	Media Type = SugarCRM_CCRM0004
	Password = "geheim"
}


# #-------------------------------------------------------
# # Kinamu Volume Pool Definition
# #-------------------------------------------------------

Pool {
	Name = SugarCRM_CCRM0004
	Use Volume Once = Yes
	Pool Type = Backup
	LabelFormat = "Vol-CCRM0004-"
	Autoprune = Yes
	Volume Retention = 31d
	Maximum Volumes = 35
	Recycle = Yes
}


# #-------------------------------------------------------
# # Kinamu FileSet/JobDefs/Job Definitionen Files
# #-------------------------------------------------------

FileSet {
	Name = CCRM0004_SugarCRM_Files
	Include {
		Options {
			compression = GZIP
			signature = MD5
		}
		File = /var/www/html
		File = /var/log
		File = /opt
		File = /etc
	}
	Exclude {
		File = /usr
		File = /tmp
		File = /proc
		File = /.journal
		File = /.fsck
	}
}

# #-------------------------------------------------------
# # Kinamu JobDefs/Job Defintionen Files Full
# #-------------------------------------------------------

JobDefs {
  Name = "CCRM0004_JobDefs_SugarCRM_Files_Full"
  Type = Backup
  Level = Full
  Client = CCRM0004-fd
  FileSet = "CCRM0004_SugarCRM_Files"
  Schedule = "SugarCRM_Backup_CCRM0004"
  Storage = SugarCRM_CCRM0004
  Messages = Standard
  Pool = SugarCRM_CCRM0004
  Priority = 10
  Write Bootstrap = "/tmp/backup/sugarcrm/ccrm0004/%c_SugarCRM_Files_Full_Jobid_%i.bsr"
}

Job {
  Name = "CCRM0004_01_Backup_SugarCRM_Files_Full"
  JobDefs = "CCRM0004_JobDefs_SugarCRM_Files_Full"
}


# #-------------------------------------------------------
# # Kinamu JobDefs/Job Defintionen Files Incremental
# #-------------------------------------------------------

JobDefs {
  Name = "CCRM0004_JobDefs_SugarCRM_Files_Incremental"
  Type = Backup
  Level = Incremental
  Client = CCRM0004-fd
  FileSet = "CCRM0004_SugarCRM_Files"
  Schedule = "SugarCRM_Backup_CCRM0004"
  Storage = SugarCRM_CCRM0004
  Messages = Standard
  Pool = SugarCRM_CCRM0004
  Priority = 10
  Write Bootstrap = "/tmp/backup/sugarcrm/ccrm0004/%c_SugarCRM_Files_Incremental_Jobid_%i.bsr"
}

Job {
  Name = "CCRM0004_02_Backup_SugarCRM_Files_Incremental"
  JobDefs = "CCRM0004_JobDefs_SugarCRM_Files_Incremental"
}



# #-------------------------------------------------------
# # Kinamu Fileset Defintion Database Backup via Pipe
# #-------------------------------------------------------


FileSet {
	Name = CCRM0004_SugarCRM_Database
	Include {
		Options {
			compression = GZIP
			signature = MD5
                }
	Plugin = "bpipe:/tmp/ccrm0004_information_schema.sql:mysqldump -f --opt --quote-names --databases information_schema:mysql"
	Plugin = "bpipe:/tmp/ccrm0004_mysql.sql:mysqldump -f --opt --quote-names --databases mysql:mysql"
	Plugin = "bpipe:/tmp/ccrm0004_sugarcrm520.sql:mysqldump -f --opt --quote-names --databases sugarcrm520:mysql"
	Plugin = "bpipe:/tmp/ccrm0004_test.sql:mysqldump -f --opt --quote-names --databases test:mysql"
	}
	Exclude {
                File = /usr
                File = /tmp
                File = /proc
                File = /.journal
                File = /.fsck
        }
}


# #-------------------------------------------------------
# # Kinamu JobDefs/Job Defintionen Database Backup Pipe
# #-------------------------------------------------------

JobDefs {
  Name = "CCRM0004_JobDefs_SugarCRM_Database"
  Type = Backup
  Level = Full
  Client = CCRM0004-fd
  FileSet = "CCRM0004_SugarCRM_Database"
  Schedule = "SugarCRM_Backup_CCRM0004"
  Storage = SugarCRM_CCRM0004
  Messages = Standard
  Pool = SugarCRM_CCRM0004
  Priority = 10
  Write Bootstrap = "/tmp/backup/sugarcrm/ccrm0004/%c_01_Backup_SugarCRM_Database_Jobid_%i.bsr"
}

Job {
  Name = "CCRM0004_03_Backup_SugarCRM_Database"
  JobDefs = "CCRM0004_JobDefs_SugarCRM_Database"
}


# #-------------------------------------------------------
# # Kinamu Fileset Definition System Backup without Sugar
# #-------------------------------------------------------


FileSet {
	Name = CCRM0004_SugarCRM_System
        Include {
                Options {
                        compression = GZIP
                        signature = MD5
                }
	File = /bin
	File = /boot
	File = /dev
	File = /etc
	File = /home
	File = /lib
	File = /lib64
	File = /media
	File = /misc
	File = /mnt
	File = /net
	File = /root
	File = /sbin
	File = /selinux
	File = /srv
	File = /usr
	File = /var
        }
        Exclude {
                File = /usr/local/bacula
		File = /var/www/html
		File = /opt
                File = /tmp
		File = /sys
                File = /proc
                File = /.journal
                File = /.fsck
        }
}


# #-------------------------------------------------------
# # Kinamu JobDefs/Job Defintionen System Backup w/o Sugar
# #-------------------------------------------------------

JobDefs {
  Name = "CCRM0004_JobDefs_SugarCRM_System"
  Type = Backup
  Level = Full
  Client = CCRM0004-fd
  FileSet = "CCRM0004_SugarCRM_System"
  Schedule = "SugarCRM_Backup_CCRM0004"
  Storage = SugarCRM_CCRM0004
  Messages = Standard
  Pool = SugarCRM_CCRM0004
  Priority = 10
  Write Bootstrap = "/tmp/backup/sugarcrm/ccrm0004/%c_01_Backup_SugarCRM_System_JobID_%i.bsr"
}

Job {
  Name = "CCRM0004_04_Backup_SugarCRM_System"
  JobDefs = "CCRM0004_JobDefs_SugarCRM_System"
}




# #----------------------------------------------------------------------------------------------------------------------------------



# #--------------------------------------------------------
# # End of Client Defintion
# #--------------------------------------------------------
