view docs/nitros9guide/dsave.refentry @ 2322:61fb37b19edd

Edition #3 - for vtio instead of cc3io Willard Goosey
author aaronwolfe
date Mon, 11 Jan 2010 04:20:41 +0000
parents b00cf13c9f61
children
line wrap: on
line source

<refentry id="dsave">
<refnamediv>
<refname>DSAVE</refname>
<refpurpose>Generate procedure file to copy files</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>dsave</command>
<arg choice="opt">
  <option>opts</option>
</arg>
<arg choice="opt">
  <replaceable>path</replaceable>
</arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsect1><title>Description</title>
<para>
Dsave is used to backup or copy all files in one or more
directories. It does not execute the commands; instead, it echos commands
to standard output.  This output can be redirected to a file and executed later as a procedure file.
</para>
<para>
When <command>dsave</command> is executed, it writes copy commands to
<emphasis>standard output</emphasis>
to copy files from the current <emphasis>data</emphasis> directory
to the directory specified by <replaceable>path</replaceable>.
If <command>dsave</command>
encounters a directory file, it will automatically include <command>makdir</command>
and <command>chd</command> commands in the output before generating copy commands for
files in the subdirectory. Since <command>dsave</command> is recursive in operation,
the procedure file will exactly replicate all levels of the file
system from the current data directory downward (such a section of
the file system is called a &quot;subtree&quot;).
</para>
<para>
If the current working directory happens to be the root directory of
the disk, <command>dsave</command> will create a procedure file that will backup the
entire disk file by file. This is useful when it is necessary to
copy many files from different format disks, or from floppy disk to
a hard disk.
</para>
<para>
Available <command>dsave</command> options are:
</para>

<informaltable frame="none">
<tgroup cols="2">
<colspec colwidth="1in"/>
<colspec colwidth="4in"/>
<tbody>
<row>
<entry>-b</entry>
<entry>make output disk a system disk by using source disk's
<filename>OS9Boot</filename> file,. if present.</entry>
</row>
<row>
<entry>-b=<replaceable>path</replaceable></entry>
<entry>make output disk a system disk using <replaceable>path</replaceable> as source
for the <filename>OS9Boot</filename> file.</entry>
</row>
<row>
<entry>-i</entry>
<entry>indent for directory levels</entry>
</row>
<row>
<entry>-l</entry>
<entry>do not process directories below the current level</entry>
</row>
<row>
<entry>-m</entry>
<entry>do not include <command>makdir</command> commands in procedure file</entry>
</row>
<row>
<entry>-r</entry>
<entry>forces the copy command to rewrite the file at its destination if it already exists</entry>
</row>
<row>
<entry>-s<replaceable>integer</replaceable></entry>
<entry>set copy size parameter to <replaceable>integer</replaceable> K</entry>
</row>
</tbody>
</tgroup>
</informaltable>


<para>
For more information see: <xref linkend="sec2.3"/>
</para>
</refsect1>
<refsect1><title>Examples</title>
<para>
Example which copies all files on &quot;d2&quot; to &quot;d1&quot;:
</para>
<screen>
chd /d0                          (select &quot;from&quot; directory)
dsave /d1 &gt;/d0/makecopy       (make procedure file &quot;makecopy&quot;)
/d0/makcopy                      (run procedure file)

chd /d0/MYFILES/STUFF
dsave -is32 /d1/BACKUP/STUFF &gt;saver
/d0/MYFILES/STUFF/saver
</screen>
</refsect1>
</refentry>