BACKUP
07/28/2000
Freemed-YiRC Beta 0.13
----------------------

Freemed-YiRC now has backup features!!!!

The 'fy_backup' shell script can be used to create a COMPLETE backup of 
Freemed-YiRC.  This script creates two tarred/gzipped (.tar.gz) files, one
for the files (.php3, pictures, docs, etc...), and one for the SQL database
dump.  The backup filenames follow this basic format:

fy_data_bkup_MMDDYYYY.tar.gz
fy_file_bkup_MMDDYYYY.tar.gz

FILE BACKUP:
	Files are backed up using the following command:
	'tar -cvf BKUPFILENAME.tar *' in the current directory.
	Then the BKUPFILENAME.tar file is gzipped (compressed) to take up less
	space.

DATA BACKUP:
	Depending on your SQL backend (either PostgreSQL or MySQL), a SQL DUMP
	image (large text file) is created of your Freemed-YiRC database.
	-=-PLEASE NOTE-=-
	If you are using PostgreSQL, then the name of your PostgreSQL database
	user (usually 'postgres') MUST RUN THE fy_backup COMMAND!!!  This is due
	to the fact that PostgreSQL does not allow you to supply user names on
	the command line.  However, this has no effect on MySQL which lets you
	supply such names.

APPLICATION:
	'fy_backup' can be used with the 'cron' utility provided on nearly all
	Linux system.  Cron can run 'fy_backup' every night at a certain time
	(say 2 or 3AM in the morning or so).  Then these files should be put on
	a floppy, burned to a CD-ROM every few days, or even FTPd to a backup
	server.

	If you have two machines then you could set up a 'hot-swap'/'fail-over'
	system.  If you FTP the 2 backup files to the second server each night,
	and program the backup server to dump it's current database and re-load
	it from the provided dump image, then if your main server goes down, and
	you are not able to recover it, then you can point all of your machines
	at the backup server which has data up til the previous night.  The data
	will never be more than 24 hours old, and in most cases will be less than
	12 hours old.  Some data is lost, but downtime is reduced significantly.

IN THE FUTURE:
	I'm planning on making Freemed-YiRC VERY FAULT TOLERANT... even on large
	LAN/WAN networks.  I plan on creating another 'client' utility which,
	in the event of a communications disruption would allow a facility to 
	access the data from the previous nights backup, but not write any new
	data (to the backup server).  HOWEVER, CERTAIN programs (like Incident
	Reports, casenotes, timecards, etc...) will be able to be entered using
	this client software.  The data will be stored temporarily, and when
	communications is restored, the data can transmitted and re-integrated
	into the main Freemed-YiRC server.  This process can be almost totally
	autonomous if set up correctly.  In the face of a crisis where the
	communications may not be up for a long time (more than 2 or 3 days),
	data can be transferred through floppy, CD-R, or even e-mail... if
	geographically possible.

Please send any comments/questions to joethielen@familyandyouth.org!!!!
