/
ColdC/Functions/
ColdC/Structure/
<head><title>ColdC: Function/Method Reference: backup()</title></head>

<body>

<h1 align=center><a href="/ColdC/">ColdC</a>: <a href="/ColdC/Functions/">Function/Method Reference</a>: backup()</h1>

<hr>

<p>
<font size=+1><i>INTEGER</i> <b>backup</b>()</font>

<p>This function syncronizes the running database on disk and copies a
backup to <i>binary</i>.bak, where <i>binary</i> is the binary
database directory name specified upon bootup (defaulting to
<tt>binary</tt>).  If the backup name already exists it and any of it's
sub contents are removed.

<p>The return value represents the success of the backup.  A value of
one was a success.  A value of zero means the backup failed when it
tried to execute <code>rm</code> in removing the existing <i>binary</i>.bak
directory.  A value of negative one (-1) means the backup failed when
attempting to execute <code>cp</code> in copying the database.  The error
<code>~error</code> is thrown if the backup cannot remove <i>binary</i>.bak
(insufficient permission).

<p>Note: because of the nature of running a disk database it is not
possible to fork the server for a backup.  The time involved in a backup
is primarily disk related (i.e. copying the binary db to another directory).
If you have a fast disk, backups will be fast.  In general backups will
be much faster than other Virtual Environment System drivers.  Because
backups are atomic, other tasks will not execute while the backup is
occuring.

<p><hr size=4><p align=center><i>Last Modified on Feb 29 1996</i>
<br><i>Copyright &copy; 1995, 1996, Brandon Gillespie</i>
</body>