What is this about ?
********************

Maintaining a backup copy of a system's RFS can be useful if the RFS becomes unusable
and booting from CD/network is difficult.
This will allow the system to boot and use it as the Root File System so that
the normal Root File System can be repaired.

UpdateBackupRFS automates the process of taking a backup copy on a disk partition
that is mounted at /RFS.BAK.

UpdateBackupRFS should be run, by hand, if significant changes have been made to the
RFS that may make it awkward to use.

This action is potentially dangerous (because is wipes the old partition completely)
and should be used with caution, this is why there is all sorts of
sanity checking at the start of this script.

This script zapps the current contents of the disk by reformatting it,
it is faster & is guaranteed to get rid of all the rubbish.

There should be a symbolic link /RFS.STD to / in the real RFS.

The file /etc/fstab in the backup RFS is edited so that it works properly when
the backup RFS is used as the real RFS.

Installation
************

Copy the file UpdateBackupRFS to /usr/local/bin and make it executable.
Note that this script used the Korn Shell (ksh), you may need to install
this on your machine.

You should create a disk partition that it big enough to take the Root File System.
This partition does not *need* to be as large as the standard RFS, although this is
probably the best and easiest stratgey. It must be large enough to hold all the
files on the standard RFS.

Create an entry in /etc/fstab that looks like:

	/dev/hda10           /RFS.BAK             ext3   defaults              1 2

Change the device name as appropriate. You can choose ext2, ext3 or reiserfs as the file
system type (use the same as the standard RFS).

Create the directories /RFS.BAK and /RFS.STD

	mkdir /RFS.BAK /RFS.STD

Initialise the backup RFS partition, check first with the -d option to see if
it is formatting the correct partition:

	UpdateBackupRFS -d -i
	

Options
*******

    -d
	Don't do anything, display the commands that would be done

    -i
	Initialise the RFS.BAK file system, no sanity checks, use -d first.

    -n
	No checking is to be made on the partition being the right one

    -r
	Recover/Rebuild from Backup to Standard RFS

    -s
	Show the name of the partition that will be used, and stop

    -x
	eXplain -- give a help message.

UpdateBackupRFS does not take any positional command line arguments.


License
*******

This software is copyright (c) Alain Williams <addw@phcomp.co.uk>, 2001, 2009.
This software is released under the GPL.


Contributing
************

BackupToDisk is free software (see the license). Free software grows and becomes more
powerful and useful as those who gain by using it contribute their changes back
to the original author.

Contributions to this software are welcome. Please email the author the following:

* your name & email address
* your affiliation (company/institute/...) if any
* the code
* documentation
* a statement that you are legally able to release the code and documentation
* a statement transfering copyright to the Author below giving permission that it
  may be redistributed as part of UserAdmin under an appropriate license

Contributions will be acknowledged in the Contributors file that accompanies this
software. If you do not want to be acknowledged please make that clear.




SCCS: @(#)README	1.1 02/03/09 19:07:15

