*********************
 Backup and Restore
*********************

There are a couple of programs to allow an Objectify archive to be compressed
and later restored.

To save the data use the following:

   archive-compress <compressed file name>

NOTE: 'sparse' is a holdover from when I was using sparse files for storage.
The archive-compress program is used to save the objects stored on any of the 
types of storage.

To restore storage from a compressed file, use the following commands:

   archive-prep --no-private
   archive-restore <compressed file name>

Also note that restoring the file with 'archive-restore' is very slow to a large
disc drive (can take hours).

Finally, there is a program 'compressed-diff' that compares two compressed 
files (the first file must be an older version of the second file):

   compressed-diff compressed-070401 compressed-070408

This will output to stdout all of the blocks that changed or were added.  It
cannot handle deleted blocks!

This command will output all of the changed and added blocks to a file:

   compressed-diff compressed-070401 compressed-070408 diff-070401-070408

And then you can use that diff file to "patch" a copy of the earlier file to
create the newer file as follows:

   compressed-patch compressed-070401 diff-070401-070408 compressed-070408


In version Alpha_26.2 I added the capability to create backup files as
information is added to the system (see: Step 2: Configure the storage medium).

The backup files are exactly the same as a diff file created by the
"compressed-diff" program, so it can be used with "compressed-patch" the same 
way:

   compressed-patch compressed-071130 objectify-20071202100443.dif compressed-071202
   compressed-patch compressed-071202 objectify-20071203083127.dif compressed-071203

Since it could take a significant amount of time to apply each backup file 
separately, I have added a program to combine the patch files into one big
dif file:

   diff-combine *.dif combined-071203.dif

Which can then be used to apply all of the backup files at the same time:

   compressed-patch compressed-071130 combined-071203.dif compressed-071204


**********************************
 Maintaining a Duplicate Archive
**********************************

In version Alpha_29.7 I added a program called 'sync_archive', now called
'archive-sync' which either copies one archive into another or syncs one to the
other.  To copy an archive on /dev/sda9 to /dev/sdg do the following:

  archive-prep --no-private
  archive-sync /dev/sda9 /dev/sdh

In version Alpha_30.5 I fixed it so that it will just add the changes.  So assuming
after the above was done, more data was stored into /dev/sda9.  Then you can do:

  archive-sync /dev/sda9 /dev/sdh

again and it will just add the changes that were made on /dev/sda9.


