<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Transitional//EN">
<HTML>
<HEAD>
  <!--
    *************************************************************************************
    * Copyright (c) 2005 VERITAS Software Corporation. All rights reserved. *

      For third-party license citations, please see the bottom of this file.
    *************************************************************************************
  -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="TEMPLATEBASE" content="vx_vxhelp_2005c">
<meta name="LASTUPDATED" content="06/17/05 10:12:14">
<meta name="PRODUCTNAME" content="VERITAS Software Documentation">
<meta name="FILENAME" content="06admin_vcs_cli.fm">
     
<title>Backing Up and Restoring VCS Configuration Files</title>

</HEAD>

<BODY bgcolor="#FFFFFF" link="#000066" vlink="#0000ff" marginheight="0" topmargin="0">
<basefont=1>

<a name="237473"></a>

<div align="left">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
 <tr>
   <td height="2" border="0" cellspacing="0" cellpadding="0" colspan="2" bgcolor="#000000">
   </td>
 </tr>
 <tr>
   <td height="15" width="50%" border="0" cellspacing="0" cellpadding="0" bgcolor="#cccccc">
    <img src="images/vxsymbol.gif" height="20" width="31" border="0" cellspacing="0" cellpadding="0" align="left">
     
     
   </td>
   <td align="right" width="50%" bgcolor="#cccccc">

<!-- Header Breadcrumbs -->
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="-2">&lt;&nbsp;<a href="06admin_vcs_cli_vcs332_212019.html" title="Previous - Initializing Cluster Attributes in the Configuration File">Previous</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="06admin_vcs_cli_vcs334_292165.html" title="Next - Using the -wait Option in Scripts">Next</a>
&nbsp;&gt;&nbsp;&nbsp;</font>
   </td>
 </tr>

 <tr>
  <td bgcolor="#CCCCCC" colspan="2" height="15" align="right">
  <font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="1">Product:  
<a href="vcs_splashpage_docCD_vcs1_103036.vxhd" title="Cluster Server Guides title page ">Cluster Server Guides</a>
  &nbsp;&nbsp;
  </font>
  </td>
 </tr>
 <tr>
  <td bgcolor="#CCCCCC" colspan="2" height="15" align="right">
  <font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="1">Manual:  
<a href="vcshp_ug_titlepage_docCD_vcs258_73700.vxhd" title="Cluster Server 4.1 User's Guide title page ">Cluster Server 4.1 User's Guide</a>
  &nbsp;&nbsp;
  </font>
  </td>
 </tr>


</table>
</div>

<div align="left">
 <table border="0" width="100%" bgcolor="#FFFFFF">
  <tr>
   <td width="100%" valign="top" bgcolor="#FFFFFF">

<!-- Start Main Topic Content -->
        <a name="startcontent"></a>
	
<h1><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="+1" color="#000000"><a name="237473"></a>Backing Up and Restoring VCS Configuration Files</font>
</h1>
 
  
  
  

<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237474"></a>VCS enables you to back up and restore VCS configuration files on each node in the cluster using the <font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap</font> command. </font>
</p>

<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237475"></a>The command includes the following options; each option is described in detail in the following sections:
<Table width="100%" border="1" cellpadding="2" cellspacing="0" >
<tr bgcolor="#CCCCCC"><th align="left"><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2" color="#000000"><b><a name="237708"></a>Option</b>
</font></th>

<th align="left"><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2" color="#000000"><b><a name="237710"></a>Action</b>
</font></th>

</tr>
<tr valign="top"><td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237712"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap</font> <font face="Courier New, Courier, sansserif, sans serif" size="2">-backup</font></font>
</p>
</td>
<td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237714"></a>Backs up files in a snapshot format.</font>
</p>
</td>
</tr>
<tr valign="top"><td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237716"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap</font> <font face="Courier New, Courier, sansserif, sans serif" size="2">-restore</font></font>
</p>
</td>
<td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237718"></a>Restores a previously created snapshot.</font>
</p>
</td>
</tr>
<tr valign="top"><td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237720"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -display</font></font>
</p>
</td>
<td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237722"></a>Displays details of previously created snapshots.</font>
</p>
</td>
</tr>
<tr valign="top"><td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237724"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -sdiff</font></font>
</p>
</td>
<td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237726"></a>Displays files that were changed on the local system after a specific snapshot was created.</font>
</p>
</td>
</tr>
<tr valign="top"><td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237728"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -fdiff </font></font>
</p>
</td>
<td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237730"></a>Displays the differences between a file in the cluster and its copy stored in a snapshot.</font>
</p>
</td>
</tr>
<tr valign="top"><td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238185"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -export </font></font>
</p>
</td>
<td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238187"></a>Exports a snapshot from the local, predefined directory to the specified file.</font>
</p>
</td>
</tr>
<tr valign="top"><td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238189"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -include</font></font>
</p>
</td>
<td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238191"></a>Configures the list of files or directories to be included in new snapshots, in addition to those included automatically by the <font face="Courier New, Courier, sansserif, sans serif" size="2">-backup</font> command.</font>
</p>
</td>
</tr>
<tr valign="top"><td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238193"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -exclude</font></font>
</p>
</td>
<td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="244804"></a>Configures the list of files or directories to be excluded from new snapshots when backing up the configuration using the <font face="Courier New, Courier, sansserif, sans serif" size="2">-backup</font> command.</font>
</p>
</td>
</tr>
<tr valign="top"><td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238197"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -delete</font></font>
</p>
</td>
<td><p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="244817"></a>Deletes snapshots from the predefined local directory on each node.</font>
</p>
</td>
</tr>

</table>


<Table width="100%" border="0" cellpadding="1" cellspacing="0">
<tr><td>
</Table></font>
</p>

<hr noshade size="2" width="100%" color="#000000">
<img src="images/note.gif" alt="Note " height="16" width="16">&nbsp;
<font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000">
<a name="238447"></a><b>Note  &nbsp;&nbsp;</b>
</font>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2" color="#000000">With the exception of the <font face="Courier New, Courier, sansserif, sans serif" size="2">-include</font>, <font face="Courier New, Courier, sansserif, sans serif" size="2">-exclude</font>, and the <font face="Courier New, Courier, sansserif, sans serif" size="2">-delete</font> options, all options can be combined with the <font face="Courier New, Courier, sansserif, sans serif" size="2">-f</font> option. This option indicates that all files be backed up to or restored from the specified single file instead of a local, predefined directory on each node. This option is useful when you want to store the configuration data to an alternate location that is periodically backed up using backup software like VERITAS Net Backup.
</font>
<hr noshade size="2" width="100%" color="#000000">



<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="238445"></a>hasnap -backup</font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238392"></a>The <font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -backup</font> command backs up files in a snapshot format.  A snapshot is a collection of VCS configuration files backed up at a particular point in time, typically before making changes to the existing configuration. A snapshot also contains information such as the snapshot name, description, creation time, and file permisisons.</font>
</p>

<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238399"></a>The command backs up a predefined list of VCS configuration files as well as a user-defined list. The predefined list includes all the *.cf files, custom agents, LLT and GAB configuration files, triggers, custom heartbeats, and action scripts. Please see the <font face="Courier New, Courier, sansserif, sans serif" size="2">-include</font> and <font face="Courier New, Courier, sansserif, sans serif" size="2">-exclude</font> commands to construct a user-defined list. </font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="237749"></a><b>Syntax</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237739"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap</font> <font face="Courier New, Courier, sansserif, sans serif" size="2">-backup [-f </font><em>filename</em><font face="Courier New, Courier, sansserif, sans serif" size="2">] [-n] [-m </font><em>description</em><font face="Courier New, Courier, sansserif, sans serif" size="2">]</font></font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="237756"></a><b>Options</b></font>
</p>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237768"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-n:</font> Runs the command in the non-interactive mode</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247804"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-m:</font> Specifies a description of the snapshot</font>
</blockquote>
<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="247286"></a><b>Examples</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247293"></a>The following command creates a backup of the configuration in the non-interactive mode and adds &quot;Test Backup&quot; as the backup description.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="247329"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-backup&nbsp;-n&nbsp;-m&nbsp;&quot;Test&nbsp;Backup&quot;</b></font>
</font>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247297"></a>The following command creates a backup of the configuration files and saves it as /tmp/backup-2-2-2003 on the node where the command was run.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="247372"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-backup&nbsp;-f&nbsp;/tmp/backup-2-2-2003</b></font>
</font>



<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="237765"></a>hasnap -restore</font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237806"></a>The <font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -restore </font>command restores configuration files from a previously created snapshot. </font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="237839"></a><b>Syntax</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237579"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap</font> <font face="Courier New, Courier, sansserif, sans serif" size="2">-restore [-f </font><em>filename</em><font face="Courier New, Courier, sansserif, sans serif" size="2">] [-n] [-s </font><em>snapid</em><font face="Courier New, Courier, sansserif, sans serif" size="2">]</font></font>
</p>

<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237580"></a>Options</font>
</p>

<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247554"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-n:</font> Runs command in the non-interactive mode</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247555"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-s</font>: Specifies the ID of the snapshot to be restored</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247556"></a>If no snapshot ID is specified, <font face="Courier New, Courier, sansserif, sans serif" size="2">-restore</font> displays which snapshots are available for restoration.</font>
</blockquote>
<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="247391"></a><b>Examples</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247392"></a>The following command restores the snapshot vcs-20030101-22232 in the non-interactive mode.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="247393"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-restore&nbsp;-n&nbsp;-s&nbsp;vcs-20030101-22232</b></font>
</font>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247394"></a>The following command restores the snapshot stored in the file /tmp/backup-2-2-2003.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="247395"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-restore&nbsp;-f&nbsp;/tmp/backup-2-2-2003</b></font>
</font>



<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="237795"></a>hasnap -display</font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237827"></a>The <font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -display </font>command displays details of previously created snapshots. </font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="237843"></a><b>Syntax</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237853"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -display [-f </font><em>filename</em><font face="Courier New, Courier, sansserif, sans serif" size="2">] [-list|-s </font><em>snapid</em><font face="Courier New, Courier, sansserif, sans serif" size="2">] [-m] [-l] [-t]</font></font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="237845"></a><b>Options</b></font>
</p>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237828"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-list</font>: Displays the list of snapshots in the repository</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237829"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-s</font>: Identifies the snapshot ID</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237830"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-m</font>: Displays snapshot description</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237831"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-l</font>: Displays the list of files in the snapshot</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237832"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-t</font>: Displays the snapshot timestamp</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237833"></a>If no options are specified, the command displays all information about the latest snapshot.</font>
</blockquote>
<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="247451"></a><b>Examples</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247452"></a>The following command lists all snapshots.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="247453"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-display&nbsp;-list</b></font>
</font>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247501"></a>The following command displays the description and the time of creation of the specified snapshot.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="247502"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-display&nbsp;-s&nbsp;vcs-20030101-2232&nbsp;-m&nbsp;-t</b></font>
</font>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247533"></a>The following command displays the description, the timestamp, and the list of all files in the snapshot file /tmp/backup-2-2-2003</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="247534"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-display&nbsp;-f&nbsp;/tmp/backup-2-2-2003</b></font>&nbsp;
</font>



<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="247538"></a>hasnap -sdiff</font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247539"></a>The <font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -sdiff</font> command displays files that were changed on the local system after a specific snapshot was created. </font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="237858"></a><b>Syntax</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237864"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -sdiff [-f </font><em>filename</em><font face="Courier New, Courier, sansserif, sans serif" size="2">] [-s </font><em>snapid</em><font face="Courier New, Courier, sansserif, sans serif" size="2">] [-sys </font><em>hostname</em><font face="Courier New, Courier, sansserif, sans serif" size="2">]</font></font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="237859"></a><b>Options</b></font>
</p>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237899"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-s</font>: Identifies the snapshot ID of the comparison snapshot.</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237900"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-sys</font>: Indicates the host on which the snapshot is to be compared.</font>
</blockquote>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237896"></a>If no options are specified, <font face="Courier New, Courier, sansserif, sans serif" size="2">-sdiff</font> uses the latest snapshot to compare the files on each node in the cluster.</font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="247582"></a><b>Examples</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247588"></a>The following command displays the differences between the current configuration and the snapshot vcs-20030101-22232.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="247597"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-sdiff&nbsp;-s&nbsp;vcs-20030101-22232</b></font>
</font>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247617"></a>The following command displays the difference between the configuration on system host1 and the snaphot stored in the file /tmp/backup-2-2-2003.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="247618"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-sdiff&nbsp;-f&nbsp;/tmp/backup-2-2-2003&nbsp;-sys&nbsp;host1</b></font>
</font>



<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="247622"></a>hasnap -fdiff</font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237921"></a>The <font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -fdiff</font> command displays the differences between a file currently on the cluster and its copy stored in a previously created snapshot. </font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="247670"></a><b>Syntax</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237582"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -fdiff [-f </font><em>filename</em><font face="Courier New, Courier, sansserif, sans serif" size="2">] [-s </font><em>snapid</em><font face="Courier New, Courier, sansserif, sans serif" size="2">] [-sys </font><em>hostname</em><font face="Courier New, Courier, sansserif, sans serif" size="2">] </font><em>file</em></font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="237906"></a><b>Options</b></font>
</p>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237935"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-s</font>: Identifies the snaphot ID of the snapshot.</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237936"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-sys</font>: Indicates the host on which the specified file is to be compared.</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237937"></a><em>file</em>: Identifies the comparison file.</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237938"></a>If no options are specified, <font face="Courier New, Courier, sansserif, sans serif" size="2">-fdiff</font> uses the latest snapshot to compare the file on each node in the cluster.</font>
</blockquote>
<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="247633"></a><b>Examples</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247676"></a>The following command displays the differences between the files /etc/VRTSvcs/conf/config/main.cf on host1 and its version in the last snapshot.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="247674"></a>&nbsp;#&nbsp;<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><b>hasnap&nbsp;-fdiff&nbsp;-sys&nbsp;host1&nbsp;/etc/VRTSvcs/conf/config/main.cf</b></font>
</font>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247769"></a>The following command displays the differences between the files /var/llttab on each node in the cluster and the version stored in the snapshot contained in the file /var/backup-2-2-2003.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="247767"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-fdiff&nbsp;-f&nbsp;/tmp/backup-2-2-2003&nbsp;/etc/llttab</b></font>
</font>



<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="237907"></a>hasnap -export</font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238001"></a>The <font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -export</font> command exports a snapshot from the local, predefined directory on each node in the cluster to the specified file. This option is useful when you want to store a previously created snapshot to an alternate location that is periodically backed up using backup software like VERITAS NetBackup. </font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="237943"></a><b>Syntax</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237583"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -export -f filename [-s </font><em>snapid</em><font face="Courier New, Courier, sansserif, sans serif" size="2">] </font></font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="237944"></a><b>Options</b></font>
</p>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238009"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-s</font>: Indicates the snapshot ID to be exported.</font>
</blockquote>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="244928"></a>If the snapshot ID is not specified, the command exports the latest snapshot to the specified file.</font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="247819"></a><b>Example</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="247913"></a>The following command exports data from snapshot vcs-20030101-22232 from each node in the cluster to the file /tmp/backup-2-2-2003 on the current node.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="247851"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-export&nbsp;-f&nbsp;/tmp/backup-2-2-2003&nbsp;-s&nbsp;vcs-20030101-22232</b></font>
</font>



<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="244859"></a>hasnap -include</font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="244860"></a>The <font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -include</font> command configures the list of files or directories to be included in new snapshots, in addition to those included automatically by the <font face="Courier New, Courier, sansserif, sans serif" size="2">-backup</font> command. Please see section on the <font face="Courier New, Courier, sansserif, sans serif" size="2">-backup</font> command for the list of files automatically included for VCS. </font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="238257"></a><b>Syntax</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238274"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -include -add|-del|-list [-sys </font><em>hostname</em><font face="Courier New, Courier, sansserif, sans serif" size="2">] 		files|directories</font></font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="238259"></a><b>Options</b></font>
</p>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238250"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-add</font>: Adds the specified files or directories to the include file list.</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238251"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-del</font>: Deletes the specified files or directories from the include file list.</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238252"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-list</font>: Displays the files or directories in the include file list.</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238253"></a><em>files/directories</em>: Identifies the file or directory names to be added to or deleted from the include list. Use this attribute with the <font face="Courier New, Courier, sansserif, sans serif" size="2">-add</font> or <font face="Courier New, Courier, sansserif, sans serif" size="2">-delete</font> options only.</font>
</blockquote>
<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="248029"></a><b>Examples</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="248056"></a>The following command displays the list of files or directories to be included in new snapshots on each node of the cluster.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="248099"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-include&nbsp;-list</b></font>
</font>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="248100"></a>The following command adds the file /opt/VRTSweb/conf/vrtsweb.xml to the include list on host1, which results in this file being included in the snapshot the next time the <font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -backup</font> command is run.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="248070"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-include&nbsp;-add&nbsp;/opt/VRTSweb/conf/vrtsweb.xml</b></font>
</font>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="248142"></a>The following command removes the file /opt/VRTSweb/conf/vrtsweb.xml from the include list on host1.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="248140"></a>&nbsp;#&nbsp;<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><b>hasnap&nbsp;-include&nbsp;-del&nbsp;-sys&nbsp;host1&nbsp;/opt/VRTSweb/conf/vrtsweb.xml</b></font>
</font>



<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="238302"></a>hasnap -exclude</font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238319"></a>The <font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -exclude</font> command configures the list of files or directories that should not be included in new snapshots when backing up the configuration using the <font face="Courier New, Courier, sansserif, sans serif" size="2">-backup</font> command. </font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="238326"></a><b>Syntax</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238334"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -exclude -add|-del|-list [-sys </font><em>hostname</em><font face="Courier New, Courier, sansserif, sans serif" size="2">] files|directories</font></font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="238327"></a><b>Options</b></font>
</p>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238320"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-add</font>: Adds the specified files or directories to the exclude file list.</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238321"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-del</font>: Deletes the specified files or directories from the exclude file list.</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238322"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-list</font>: Displays the files or directories in the exclude file list.</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238323"></a><em>files/directories</em>: Identifies the files or directories to be added to or deleted from the exclude list. Use this attribute with the <font face="Courier New, Courier, sansserif, sans serif" size="2">-add</font> or <font face="Courier New, Courier, sansserif, sans serif" size="2">-delete</font> options only.</font>
</blockquote>
<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="248157"></a><b>Examples</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="248179"></a>The following command displays the exclude file list on each node in the cluster.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="248177"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-exclude&nbsp;-list</b></font>
</font>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="248437"></a>The following command adds the file /etc/VRTSvcs/conf/config/temp.cf to the exclude file list on host1, which results in this file being excluded from the snapshot the next time the <font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -backup</font> command is run.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="248353"></a>#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-exclude&nbsp;-add&nbsp;-sys&nbsp;host1&nbsp;/etc/VRTSvcs/conf/config/temp.cf</b></font>
</font>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="248552"></a>The following command removes the file /etc/VRTSvcs/conf/config/temp.cf from the exclude list on host1.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="248550"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-exclude&nbsp;-del&nbsp;-sys&nbsp;host1&nbsp;/etc/VRTSvcs/conf/config/temp.cf</b></font>
</font>



<h3><font face="Arial, Helvetica, Geneva, sansserif, sans serif, Verdana" size="2" color="#000000"><a name="238300"></a>hasnap -delete</font>
</h3>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238351"></a>The <font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -delete</font> command deletes previously created snapshots from the predefined local directory on each node. </font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="237965"></a><b>Syntax</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="237585"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">hasnap -delete [-s </font><em>snapid</em><font face="Courier New, Courier, sansserif, sans serif" size="2">]</font></font>
</p>

<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="237966"></a><b>Options</b></font>
</p>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238364"></a><font face="Courier New, Courier, sansserif, sans serif" size="2">-s</font>: Snapshot ID to be deleted.</font>
</blockquote>
<blockquote>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="238365"></a>If the snapshot ID is not specified, the command displays a list of snapshots available for deletion.</font>
</blockquote>
<br>
<p>
<font face="Font_SingleByte;" size="2"><a name="248579"></a><b>Example</b></font>
</p>
<p>
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="2"><a name="248611"></a>The following command deletes snapshot vcs-20030101-22232 from the cluster.</font>
</p>

<br>
<font face="Courier New, Courier, sansserif, sans serif" size="2"><a name="248624"></a>&nbsp;#&nbsp;<font face="Courier New, Courier, sansserif, sans serif" size="2"><b>hasnap&nbsp;-delete&nbsp;-s&nbsp;vcs-20030101-22232</b></font>
</font>

<!-- End Main Topic Content -->

   </td>
  </tr>
 </table>
</div>

<div>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
 <tr>
  <td height="18" border="0" cellspacing="0" cellpadding="0" colspan="2" bgcolor="#FFFFFF">
  </td>
 </tr>
  <td align="left"><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="-2">&nbsp;&#94;&nbsp;<a href="06admin_vcs_cli_vcs333_237473.html" title="Backing Up and Restoring VCS Configuration Files">Return to Top</a></font>

  </td>
  <td align="right"><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="-2">&lt;&nbsp;<a href="06admin_vcs_cli_vcs332_212019.html" title="Previous - Initializing Cluster Attributes in the Configuration File">Previous</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="06admin_vcs_cli_vcs334_292165.html" title="Next - Using the -wait Option in Scripts">Next</a>
&nbsp;&gt;&nbsp;&nbsp;</font>
  </td>
 <tr>
   <td height="9" border="0" cellspacing="0" cellpadding="0" colspan="2" bgcolor="#FFFFFF">
   </td>
 </tr>

<!-- Footer Breadcrumbs -->
<tr>
<td bgcolor="#FFFFFF" colspan="2" height="15" align="right">
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="1">Product:  
<a href="vcs_splashpage_docCD_vcs1_103036.vxhd" title="Cluster Server Guides title page ">Cluster Server Guides</a>&nbsp;&nbsp;</font></td>
</tr>

<tr>
<td bgcolor="#FFFFFF" colspan="2" height="15" align="right">
<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="1">Manual:  
<a href="vcshp_ug_titlepage_docCD_vcs258_73700.vxhd" title="Cluster Server 4.1 User's Guide title page ">Cluster Server 4.1 User's Guide</a>&nbsp;&nbsp;</font></td>
</tr>


 <tr>
  <td colspan="2" align="left"><font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" color="#000000" align="right" size="-2">
<em>VERITAS Software Corporation
</em></font><br>

<font face="Verdana, Arial, Helvetica, Geneva, sansserif, sans serif" size="-2">www.veritas.com</font><br>
  </td>
 </tr>
</table>
</div>

</BODY>
  <!--
    *************************************************************************************
    * Copyright (c) 2005 VERITAS Software Corporation. All rights reserved. *

    VERITAS, VERITAS SOFTWARE, the VERITAS Logo, and VERITAS Software Documentation 
    are trademarks or registered trademarks of VERITAS Software Corporation 
    or its affiliates in the U.S. and other countries. Other names may be 
    trademarks of their respective owners. 

    Apache Jakarta Lucene:
    Apache Software License
    Version 1.1

    Copyright (c) 2000 The Apache Software Foundation. All rights reserved.

    Redistribution and use in source and binary forms, with or without modification, 
    are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice, this 
    list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright notice, this 
    list of conditions and the following disclaimer in the documentation and/or other 
    materials provided with the distribution.

    3. The end-user documentation included with the redistribution, if any, must include 
    the following acknowledgment: "This product includes software developed by the Apache 
    Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may 
    appear in the software itself, if and wherever such third-party acknowledgments 
    normally appear.

    4. The names "Apache" and "Apache Software Foundation" must not be used to endorse or 
    promote products derived from this software without prior written permission. For 
    written permission, please contact apache@apache.org.

    5. Products derived from this software may not be called "Apache", nor may "Apache" 
    appear in their name, without prior written permission of the Apache Software Foundation.

    THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, 
    BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
    PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION 
    OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 
    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
    OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 
    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    This software consists of voluntary contributions made by many individuals on behalf 
    of the Apache Software Foundation. For more information on the Apache Software Foundation, 
    please see <http://www.apache.org/>. Portions of this software are based upon public domain 
    software originally written at the National Center for Supercomputing Applications, University 
    of Illinois, Urbana-Champaign.
    
    This product includes WebWindow Software developed by Horst Heistermann.
    *************************************************************************************
  -->
</HTML>
